From 480e47742b419e8cddbcc49556b1783c14da7051 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 17 Jan 2019 06:55:27 -0800 Subject: [PATCH 01/56] Add link to meta block tutorial (#13298) * Add link to meta block tutorial The documentation suggests that meta data be stored using blocks, this PR adds a link to the tutorial showing how to do so. * Update docs/designers-developers/developers/backward-compatibility/meta-box.md Co-Authored-By: mkaz --- .../developers/backward-compatibility/meta-box.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/designers-developers/developers/backward-compatibility/meta-box.md b/docs/designers-developers/developers/backward-compatibility/meta-box.md index 5403ebf674ac31..e6268e6924ea90 100644 --- a/docs/designers-developers/developers/backward-compatibility/meta-box.md +++ b/docs/designers-developers/developers/backward-compatibility/meta-box.md @@ -1,6 +1,6 @@ # Meta Boxes -This is a brief document detailing how meta box support works in Gutenberg. With the superior developer and user experience of blocks, especially once block templates are available, **porting PHP meta boxes to blocks is highly encouraged!** +This is a brief document detailing how meta box support works in Gutenberg. With the superior developer and user experience of blocks, especially once block templates are available, **porting PHP meta boxes to blocks is highly encouraged!** See the [Meta Block tutorial](/docs/designers-developers/developers/tutorials/metabox/meta-block-1-intro.md) for how to store post meta data using blocks. ### Testing, Converting, and Maintaining Existing Meta Boxes From e38b060c347dc55ed9690f5ddbf628f6776c072f Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Thu, 17 Jan 2019 12:25:57 -0500 Subject: [PATCH 02/56] Update Block Design doc to include mention of the "Advanced" sidebar panel (#13348) * Update Block Design doc to make note of the Advanced sidebar panel. This panel is intended to house power user controls (like the "Additional CSS Class" field it ships with by default). The handbook should be clear about that, to promote that panel's usage. * Update docs/designers-developers/designers/block-design.md Break a long paragraph into multiple lines. Co-Authored-By: kjellr * Break "Advanced" panel description into its own paragraph. --- docs/designers-developers/designers/block-design.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/designers-developers/designers/block-design.md b/docs/designers-developers/designers/block-design.md index 8b267c0d754da9..64eb736142c9d5 100644 --- a/docs/designers-developers/designers/block-design.md +++ b/docs/designers-developers/designers/block-design.md @@ -17,7 +17,11 @@ Basic block settings won’t always make sense in the context of the placeholder ### The block sidebar should only be used for advanced, tertiary controls -The sidebar is not visible by default on a small / mobile screen, and may also be collapsed in a desktop view. Therefore, it should not be relied on for anything that is necessary for the basic operation of the block. Pick good defaults, make important actions available in the block toolbar, and think of the sidebar as something that only power users may discover. In addition, use sections and headers in the block sidebar if there are more than a handful of options, in order to allow users to easily scan and understand the options available. +The sidebar is not visible by default on a small / mobile screen, and may also be collapsed in a desktop view. Therefore, it should not be relied on for anything that is necessary for the basic operation of the block. Pick good defaults, make important actions available in the block toolbar, and think of the sidebar as something that most users should not need to open. + +In addition, use sections and headers in the block sidebar if there are more than a handful of options, in order to allow users to easily scan and understand the options available. + +Each block sidebar comes with an "Advanced" section by default. This area houses an "Additional CSS Class" field, and should be used to house other power user controls. ## Setup state vs. live preview state From df2fad3816d2d4a6a919c3037ef616f5328d0857 Mon Sep 17 00:00:00 2001 From: Pinar Olguc Date: Thu, 17 Jan 2019 20:31:43 +0300 Subject: [PATCH 03/56] Add onCaretVerticalPositionChange event (#13323) --- packages/block-library/src/heading/edit.native.js | 1 + packages/block-library/src/paragraph/edit.native.js | 1 + packages/editor/src/components/rich-text/index.native.js | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index e613b9156b824a..44289a550ce0b0 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -58,6 +58,7 @@ class HeadingEdit extends Component { isSelected={ this.props.isSelected } onFocus={ this.props.onFocus } // always assign onFocus as a props onBlur={ this.props.onBlur } // always assign onBlur as a props + onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } style={ { minHeight: Math.max( minHeight, this.state.aztecHeight ), } } diff --git a/packages/block-library/src/paragraph/edit.native.js b/packages/block-library/src/paragraph/edit.native.js index ecb075bca8003e..85183973dddea6 100644 --- a/packages/block-library/src/paragraph/edit.native.js +++ b/packages/block-library/src/paragraph/edit.native.js @@ -94,6 +94,7 @@ class ParagraphEdit extends Component { isSelected={ this.props.isSelected } onFocus={ this.props.onFocus } // always assign onFocus as a props onBlur={ this.props.onBlur } // always assign onBlur as a props + onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } style={ { ...style, minHeight: Math.max( minHeight, this.state.aztecHeight ), diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index fd9d074472f5ad..692a51f7518108 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -379,6 +379,7 @@ export class RichText extends Component { onBackspace={ this.onBackspace } onContentSizeChange={ this.onContentSizeChange } onActiveFormatsChange={ this.onActiveFormatsChange } + onCaretVerticalPositionChange={ this.props.onCaretVerticalPositionChange } isSelected={ this.props.isSelected } blockType={ { tag: tagName } } color={ 'black' } From c2f1059b10ebb3c5457ae61adc05920af4729d58 Mon Sep 17 00:00:00 2001 From: Mel Choyce Date: Thu, 17 Jan 2019 14:08:04 -0500 Subject: [PATCH 04/56] Update FormToggle readme (#13353) Updating documentation to describe the use and functionality of the TextareaControl component. Thanks to @drw158 and @sarahmonster for drafting this. --- packages/components/src/form-toggle/README.md | 94 +++++++++++++++++-- 1 file changed, 84 insertions(+), 10 deletions(-) diff --git a/packages/components/src/form-toggle/README.md b/packages/components/src/form-toggle/README.md index 0df538aee47f66..e2bfcefb07196d 100644 --- a/packages/components/src/form-toggle/README.md +++ b/packages/components/src/form-toggle/README.md @@ -1,22 +1,57 @@ # FormToggle -The Form Toggle Control is a switch that should be **used when the effect is boolean and instant**. The Form Toggle Control is a complement to the Checkbox Control. +FormToggle switches a single setting on or off. -Use Form Toggle when: +![On and off FormToggles. The top toggle is on, while the bottom toggle is off.](https://wordpress.org/gutenberg/files/2019/01/Toggle.jpg) -- The effect of the switch is immediately visible to the user. For example: when applying a drop-cap to text, the actual drop-cap is immediately activated. -- There are only two states for the switch: on or off. +## Table of contents -Do **not** use: +1. [Design guidelines](#design-guidelines) +2. [Development guidelines](#development-guidelines) +3. [Related components](#related-components) -- When the control is part of a group of other related controls (multiple choice). -- When the effect of flipping the switch is not instantaneous. +## Design guidelines -When Form Toggle component is not appropriate, use the Checkbox Control. +### Usage -Note: it is recommended that you pair the switch control with contextual help text, for example `checked ? __( 'Thumbnails are cropped to align.' ) : __( 'Thumbnails are not cropped.' )`. +#### When to use toggles -## Usage +Use toggles when you want users to: + +- Switch a single option on or off. +- Immediately activate or deactivate something. + +![FormToggle used for a “fixed background” setting](https://wordpress.org/gutenberg/files/2019/01/Toggle-Do.jpg) + +**Do** +Use toggles to switch an option on or off. + +![Radio used for a “fixed background” setting](https://wordpress.org/gutenberg/files/2019/01/Toggle-Dont.jpg) + +**Don’t** +Don’t use radio buttons for settings that toggle on and off. + +Toggles are preferred when the user is not expecting to submit data, as is the case with checkboxes and radio buttons. + +#### State + +When the user slides a toggle thumb (1) to the other side of the track (2) and the state of the toggle changes, it’s been successfully toggled. + +![Diagram showing FormToggle states](https://wordpress.org/gutenberg/files/2019/01/Toggle-Diagram.jpg) + +#### Text label + +Toggles should have clear inline labels so users know exactly what option the toggle controls, and whether the option is enabled or disabled. + +Do not include any text (e.g. “on” or “off”) within the toggle element itself. The toggle alone should be sufficient to communicate the state. + +### Behavior + +When a user switches a toggle, its corresponding action takes effect immediately. + +## Development guidelines + +### Usage ```jsx import { FormToggle } from '@wordpress/components'; @@ -31,3 +66,42 @@ const MyFormToggle = withState( { /> ) ); ``` + +### Props + +The component accepts the following props: + +#### label + +If this property is added, a label will be generated using label property as the content. + +- Type: `String` +- Required: No + +#### help + +If this property is added, a help text will be generated using help property as the content. + +- Type: `String` | `Function` +- Required: No + +#### checked + +If checked is true the toggle will be checked. If checked is false the toggle will be unchecked. +If no value is passed the toggle will be unchecked. + +- Type: `Boolean` +- Required: No + +#### onChange + +A function that receives the checked state (boolean) as input. + +- Type: `function` +- Required: Yes + +## Related components + +- To select one option from a set, and you want to show them all the available options at once, use the `Radio` component. +- To select one or more items from a set, use the `CheckboxControl` component. + From 7aa56f3bd3f63e6eadc5d9147dcd8cc857ee80cc Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Fri, 18 Jan 2019 11:32:34 +0800 Subject: [PATCH 05/56] Add jsdoc @deprecated tag to docs output (#13354) * Update doc generation to include @deprecated jsdoc tag on functions --- docs/tool/generator.js | 8 +++++++- docs/tool/parser.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/tool/generator.js b/docs/tool/generator.js index 1f7a0744dbf3e3..a632fb40b52681 100644 --- a/docs/tool/generator.js +++ b/docs/tool/generator.js @@ -32,11 +32,17 @@ function generateTableOfContent( parsedNamespaces ) { */ function generateFunctionDocs( parsedFunc, generateDocsForReturn = true ) { return [ - `### ${ parsedFunc.name }`, + `### ${ parsedFunc.name }${ parsedFunc.deprecated ? ' (deprecated)' : '' }`, parsedFunc.description ? [ '', parsedFunc.description, ].join( '\n' ) : null, + parsedFunc.deprecated ? [ + '', + '*Deprecated*', + '', + `Deprecated ${ parsedFunc.deprecated.description }`, + ].join( '\n' ) : null, parsedFunc.params.length ? [ '', '*Parameters*', diff --git a/docs/tool/parser.js b/docs/tool/parser.js index 480e23ffc57026..41b02c87bb314e 100644 --- a/docs/tool/parser.js +++ b/docs/tool/parser.js @@ -114,6 +114,7 @@ module.exports = function( config ) { const func = { name, description: docBlock.description, + deprecated: docBlock.tags.find( ( tag ) => tag.title === 'deprecated' ), params: docBlock.tags.filter( ( tag ) => tag.title === 'param' ), return: docBlock.tags.find( ( tag ) => tag.title === 'return' ), }; From 3111e48392b4d6d01a681bc149be7526bdb3e44a Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Fri, 18 Jan 2019 16:34:35 +0800 Subject: [PATCH 06/56] Add background color control for table block (#10611) * Add background and text color controls for table block * Modify fallback styles to use first table row * Make text color control apply to all rows, not only striped row * Simplify implementation of colors for table block. - Remove text color control - Disable custom colors - Apply class names to table element instead of tr element - Remove JS striping * Filter colors in table background color control to only those that contrast with the default text color * Remove errant tab * Export using a single statement * Revert "Filter colors in table background color control to only those that contrast with the default text color" This reverts commit 8a39fbcf4ce4e6066a16c744c6e0a01936bc542f. * Fix issue with row element not being present when fallback styles first applied * Use a predefined set of background colors suitable for a table * Add createCustomColorsHOC HOC builder that creates withColors HOC for usages with custom colors array. Refactor withColorHOC. Ensure withSelect is not used when not needed, and ensure custom color HOC has the right display name Add tests for new createCustomColorsHOC * Use createCustomColorHOC for table backgrounds and refactor to use only class names to set the background color * Remove contrast checker from table block background color selector - table block has custom background colors designed to meet contrast requirements * Remove use of compose for single HOC * Modify use of classnames, pass backgroundColor as an argument instead of using the object form * update CHANGELOG --- packages/block-library/CHANGELOG.md | 6 + packages/block-library/src/table/edit.js | 73 ++++- packages/block-library/src/table/editor.scss | 2 +- packages/block-library/src/table/index.js | 28 +- packages/block-library/src/table/style.scss | 46 +++ packages/editor/CHANGELOG.md | 6 +- .../editor/src/components/colors/index.js | 5 +- .../test/__snapshots__/with-colors.js.snap | 23 ++ .../src/components/colors/test/with-colors.js | 56 ++++ .../src/components/colors/with-colors.js | 277 +++++++++++------- 10 files changed, 399 insertions(+), 123 deletions(-) create mode 100644 packages/editor/src/components/colors/test/__snapshots__/with-colors.js.snap create mode 100644 packages/editor/src/components/colors/test/with-colors.js diff --git a/packages/block-library/CHANGELOG.md b/packages/block-library/CHANGELOG.md index 65cbad9ef8dc47..398b2af5887d9b 100644 --- a/packages/block-library/CHANGELOG.md +++ b/packages/block-library/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.3.0 (Unreleased) + +### New Feature + +- Add background color controls for the table block. + ## 2.2.12 (2019-01-03) ## 2.2.11 (2018-12-18) diff --git a/packages/block-library/src/table/edit.js b/packages/block-library/src/table/edit.js index d9358c04845ab8..b0c789a7247200 100644 --- a/packages/block-library/src/table/edit.js +++ b/packages/block-library/src/table/edit.js @@ -7,7 +7,13 @@ import classnames from 'classnames'; * WordPress dependencies */ import { Fragment, Component } from '@wordpress/element'; -import { InspectorControls, BlockControls, RichText } from '@wordpress/editor'; +import { + InspectorControls, + BlockControls, + RichText, + PanelColorSettings, + createCustomColorsHOC, +} from '@wordpress/editor'; import { __ } from '@wordpress/i18n'; import { PanelBody, @@ -30,7 +36,32 @@ import { deleteColumn, } from './state'; -export default class TableEdit extends Component { +const BACKGROUND_COLORS = [ + { + color: '#f3f4f5', + name: 'Subtle light gray', + slug: 'subtle-light-gray', + }, + { + color: '#e9fbe5', + name: 'Subtle pale green', + slug: 'subtle-pale-green', + }, + { + color: '#e7f5fe', + name: 'Subtle pale blue', + slug: 'subtle-pale-blue', + }, + { + color: '#fcf0ef', + name: 'Subtle pale pink', + slug: 'subtle-pale-pink', + }, +]; + +const withCustomBackgroundColors = createCustomColorsHOC( BACKGROUND_COLORS ); + +export class TableEdit extends Component { constructor() { super( ...arguments ); @@ -314,7 +345,7 @@ export default class TableEdit extends Component { return ( - { rows.map( ( { cells }, rowIndex ) => + { rows.map( ( { cells }, rowIndex ) => ( { cells.map( ( { content, tag: CellTag }, columnIndex ) => { const isSelected = selectedCell && ( @@ -329,12 +360,13 @@ export default class TableEdit extends Component { columnIndex, }; - const classes = classnames( { - 'is-selected': isSelected, - } ); + const cellClasses = classnames( { 'is-selected': isSelected } ); return ( - + - ) } + ) ) } ); } @@ -360,7 +392,12 @@ export default class TableEdit extends Component { } render() { - const { attributes, className } = this.props; + const { + attributes, + className, + backgroundColor, + setBackgroundColor, + } = this.props; const { initialRowCount, initialColumnCount } = this.state; const { hasFixedLayout, head, body, foot } = attributes; const isEmpty = ! head.length && ! body.length && ! foot.length; @@ -388,8 +425,9 @@ export default class TableEdit extends Component { ); } - const classes = classnames( className, { + const classes = classnames( className, backgroundColor.class, { 'has-fixed-layout': hasFixedLayout, + 'has-background': !! backgroundColor.color, } ); return ( @@ -411,6 +449,19 @@ export default class TableEdit extends Component { onChange={ this.onChangeFixedLayout } /> +
@@ -421,3 +472,5 @@ export default class TableEdit extends Component { ); } } + +export default withCustomBackgroundColors( 'backgroundColor' )( TableEdit ); diff --git a/packages/block-library/src/table/editor.scss b/packages/block-library/src/table/editor.scss index 22170648d74500..c6fec7750d23b7 100644 --- a/packages/block-library/src/table/editor.scss +++ b/packages/block-library/src/table/editor.scss @@ -27,7 +27,7 @@ td, th { padding: 0; - border: $border-width solid currentColor; + border: $border-width solid $black; } td.is-selected, diff --git a/packages/block-library/src/table/index.js b/packages/block-library/src/table/index.js index aff5c7ca5be8cb..c6221d688c3929 100644 --- a/packages/block-library/src/table/index.js +++ b/packages/block-library/src/table/index.js @@ -8,8 +8,8 @@ import classnames from 'classnames'; */ import { __, _x } from '@wordpress/i18n'; import { getPhrasingContentSchema } from '@wordpress/blocks'; -import { RichText } from '@wordpress/editor'; import { G, Path, SVG } from '@wordpress/components'; +import { RichText, getColorClassName } from '@wordpress/editor'; /** * Internal dependencies @@ -86,6 +86,9 @@ export const settings = { type: 'boolean', default: false, }, + backgroundColor: { + type: 'string', + }, head: getTableSectionAttributeSchema( 'head' ), body: getTableSectionAttributeSchema( 'body' ), foot: getTableSectionAttributeSchema( 'foot' ), @@ -113,15 +116,24 @@ export const settings = { edit, save( { attributes } ) { - const { hasFixedLayout, head, body, foot } = attributes; + const { + hasFixedLayout, + head, + body, + foot, + backgroundColor, + } = attributes; const isEmpty = ! head.length && ! body.length && ! foot.length; if ( isEmpty ) { return null; } - const classes = classnames( { + const backgroundClass = getColorClassName( 'background-color', backgroundColor ); + + const classes = classnames( backgroundClass, { 'has-fixed-layout': hasFixedLayout, + 'has-background': !! backgroundClass, } ); const Section = ( { type, rows } ) => { @@ -133,13 +145,17 @@ export const settings = { return ( - { rows.map( ( { cells }, rowIndex ) => + { rows.map( ( { cells }, rowIndex ) => (
{ cells.map( ( { content, tag }, cellIndex ) => - + ) } - ) } + ) ) } ); }; diff --git a/packages/block-library/src/table/style.scss b/packages/block-library/src/table/style.scss index 0da2a2951fd0df..3fda38e27b8604 100644 --- a/packages/block-library/src/table/style.scss +++ b/packages/block-library/src/table/style.scss @@ -1,4 +1,9 @@ .wp-block-table { + $subtle-light-gray: #f3f4f5; + $subtle-pale-green: #e9fbe5; + $subtle-pale-blue: #e7f5fe; + $subtle-pale-pink: #fcf0ef; + // Fixed layout toggle &.has-fixed-layout { table-layout: fixed; @@ -18,15 +23,56 @@ width: auto; } + &.has-subtle-light-gray-background-color { + background-color: $subtle-light-gray; + } + + &.has-subtle-pale-green-background-color { + background-color: $subtle-pale-green; + } + + &.has-subtle-pale-blue-background-color { + background-color: $subtle-pale-blue; + } + + &.has-subtle-pale-pink-background-color { + background-color: $subtle-pale-pink; + } + // "Stripes" style variation. &.is-style-stripes { border-spacing: 0; border-collapse: inherit; + background-color: transparent; tr:nth-child(odd) { background-color: $light-gray-200; } + &.has-subtle-light-gray-background-color { + tr:nth-child(odd) { + background-color: $subtle-light-gray; + } + } + + &.has-subtle-pale-green-background-color { + tr:nth-child(odd) { + background-color: $subtle-pale-green; + } + } + + &.has-subtle-pale-blue-background-color { + tr:nth-child(odd) { + background-color: $subtle-pale-blue; + } + } + + &.has-subtle-pale-pink-background-color { + tr:nth-child(odd) { + background-color: $subtle-pale-pink; + } + } + td { border-color: transparent; } diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index 026353023b61da..e4cc87f80faa4f 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -1,4 +1,8 @@ -## 9.0.8 (Unreleased) +## 9.1.0 (Unreleased) + +### New Feature + +- Added `createCustomColorsHOC` for creating a higher order `withCustomColors` component. ### Internal diff --git a/packages/editor/src/components/colors/index.js b/packages/editor/src/components/colors/index.js index 6782423e668337..f6b6fac984db89 100644 --- a/packages/editor/src/components/colors/index.js +++ b/packages/editor/src/components/colors/index.js @@ -3,4 +3,7 @@ export { getColorObjectByAttributeValues, getColorObjectByColorValue, } from './utils'; -export { default as withColors } from './with-colors'; +export { + createCustomColorsHOC, + default as withColors, +} from './with-colors'; diff --git a/packages/editor/src/components/colors/test/__snapshots__/with-colors.js.snap b/packages/editor/src/components/colors/test/__snapshots__/with-colors.js.snap new file mode 100644 index 00000000000000..fb33dd8d00235b --- /dev/null +++ b/packages/editor/src/components/colors/test/__snapshots__/with-colors.js.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`createCustomColorsHOC provides the the wrapped component with color values and setter functions as props 1`] = ` + +`; diff --git a/packages/editor/src/components/colors/test/with-colors.js b/packages/editor/src/components/colors/test/with-colors.js new file mode 100644 index 00000000000000..07c19ce0c11e7a --- /dev/null +++ b/packages/editor/src/components/colors/test/with-colors.js @@ -0,0 +1,56 @@ +/** + * External dependencies + */ +import { shallow, mount } from 'enzyme'; + +/** + * Internal dependencies + */ +import { createCustomColorsHOC } from '../with-colors'; + +describe( 'createCustomColorsHOC', () => { + it( 'provides the the wrapped component with color values and setter functions as props', () => { + const withCustomColors = createCustomColorsHOC( [ { name: 'Red', slug: 'red', color: 'ff0000' } ] ); + const EnhancedComponent = withCustomColors( 'backgroundColor' )( () => ( +
+ ) ); + + const wrapper = shallow( + + ); + + expect( wrapper.dive() ).toMatchSnapshot(); + } ); + + it( 'setting the color to a value in the provided custom color array updated the backgroundColor attribute', () => { + const withCustomColors = createCustomColorsHOC( [ { name: 'Red', slug: 'red', color: 'ff0000' } ] ); + const EnhancedComponent = withCustomColors( 'backgroundColor' )( ( props ) => ( + + ) ); + + const setAttributes = jest.fn(); + + const wrapper = mount( + + ); + + wrapper.find( 'button' ).simulate( 'click' ); + expect( setAttributes ).toHaveBeenCalledWith( { backgroundColor: 'red', customBackgroundColor: undefined } ); + } ); + + it( 'setting the color to a value not in the provided custom color array updates customBackgroundColor attribute', () => { + const withCustomColors = createCustomColorsHOC( [ { name: 'Red', slug: 'red', color: 'ff0000' } ] ); + const EnhancedComponent = withCustomColors( 'backgroundColor' )( ( props ) => ( + + ) ); + + const setAttributes = jest.fn(); + + const wrapper = mount( + + ); + + wrapper.find( 'button' ).simulate( 'click' ); + expect( setAttributes ).toHaveBeenCalledWith( { backgroundColor: undefined, customBackgroundColor: '000000' } ); + } ); +} ); diff --git a/packages/editor/src/components/colors/with-colors.js b/packages/editor/src/components/colors/with-colors.js index 3d1bccc8c26569..3afb5e7d7469c9 100644 --- a/packages/editor/src/components/colors/with-colors.js +++ b/packages/editor/src/components/colors/with-colors.js @@ -18,117 +18,186 @@ import { getColorClassName, getColorObjectByColorValue, getColorObjectByAttribut const DEFAULT_COLORS = []; /** - * Higher-order component, which handles color logic for class generation - * color value, retrieval and color attribute setting. + * Higher order component factory for injecting the `colorsArray` argument as + * the colors prop in the `withCustomColors` HOC. * - * @param {...(object|string)} args The arguments can be strings or objects. If the argument is an object, - * it should contain the color attribute name as key and the color context as value. - * If the argument is a string the value should be the color attribute name, - * the color context is computed by applying a kebab case transform to the value. - * Color context represents the context/place where the color is going to be used. - * The class name of the color is generated using 'has' followed by the color name - * and ending with the color context all in kebab case e.g: has-green-background-color. + * @param {Array} colorsArray An array of color objects. * + * @return {function} The higher order component. + */ +const withCustomColorPalette = ( colorsArray ) => createHigherOrderComponent( ( WrappedComponent ) => ( props ) => ( + +), 'withCustomColorPalette' ); + +/** + * Higher order component factory for injecting the editor colors as the + * `colors` prop in the `withColors` HOC. * - * @return {Function} Higher-order component. + * @return {function} The higher order component. + */ +const withEditorColorPalette = () => withSelect( ( select ) => { + const settings = select( 'core/editor' ).getEditorSettings(); + return { + colors: get( settings, [ 'colors' ], DEFAULT_COLORS ), + }; +} ); + +/** + * Helper function used with `createHigherOrderComponent` to create + * higher order components for managing color logic. + * + * @param {Array} colorTypes An array of color types (e.g. 'backgroundColor, borderColor). + * @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent. + * + * @return {Component} The component that can be used as a HOC. */ -export default ( ...args ) => { - const colorMap = reduce( args, ( colorObject, arg ) => { +function createColorHOC( colorTypes, withColorPalette ) { + const colorMap = reduce( colorTypes, ( colorObject, colorType ) => { return { ...colorObject, - ...( isString( arg ) ? { [ arg ]: kebabCase( arg ) } : arg ), + ...( isString( colorType ) ? { [ colorType ]: kebabCase( colorType ) } : colorType ), }; }, {} ); - return createHigherOrderComponent( - compose( [ - withSelect( ( select ) => { - const settings = select( 'core/editor' ).getEditorSettings(); - return { - colors: get( settings, [ 'colors' ], DEFAULT_COLORS ), - }; - } ), - ( WrappedComponent ) => { - return class extends Component { - constructor( props ) { - super( props ); - - this.setters = this.createSetters(); - this.colorUtils = { - getMostReadableColor: this.getMostReadableColor.bind( this ), - }; - - this.state = {}; - } - - getMostReadableColor( colorValue ) { - const { colors } = this.props; - return getMostReadableColor( colors, colorValue ); - } - - createSetters() { - return reduce( colorMap, ( settersAccumulator, colorContext, colorAttributeName ) => { - const upperFirstColorAttributeName = upperFirst( colorAttributeName ); - const customColorAttributeName = `custom${ upperFirstColorAttributeName }`; - settersAccumulator[ `set${ upperFirstColorAttributeName }` ] = - this.createSetColor( colorAttributeName, customColorAttributeName ); - return settersAccumulator; - }, {} ); - } - - createSetColor( colorAttributeName, customColorAttributeName ) { - return ( colorValue ) => { - const colorObject = getColorObjectByColorValue( this.props.colors, colorValue ); - this.props.setAttributes( { - [ colorAttributeName ]: colorObject && colorObject.slug ? colorObject.slug : undefined, - [ customColorAttributeName ]: colorObject && colorObject.slug ? undefined : colorValue, - } ); - }; - } - - static getDerivedStateFromProps( { attributes, colors }, previousState ) { - return reduce( colorMap, ( newState, colorContext, colorAttributeName ) => { - const colorObject = getColorObjectByAttributeValues( - colors, - attributes[ colorAttributeName ], - attributes[ `custom${ upperFirst( colorAttributeName ) }` ], - ); - - const previousColorObject = previousState[ colorAttributeName ]; - const previousColor = get( previousColorObject, [ 'color' ] ); - /** - * The "and previousColorObject" condition checks that a previous color object was already computed. - * At the start previousColorObject and colorValue are both equal to undefined - * bus as previousColorObject does not exist we should compute the object. - */ - if ( previousColor === colorObject.color && previousColorObject ) { - newState[ colorAttributeName ] = previousColorObject; - } else { - newState[ colorAttributeName ] = { - ...colorObject, - class: getColorClassName( colorContext, colorObject.slug ), - }; - } - return newState; - }, {} ); - } - - render() { - return ( - + return compose( [ + withColorPalette, + ( WrappedComponent ) => { + return class extends Component { + constructor( props ) { + super( props ); + + this.setters = this.createSetters(); + this.colorUtils = { + getMostReadableColor: this.getMostReadableColor.bind( this ), + }; + + this.state = {}; + } + + getMostReadableColor( colorValue ) { + const { colors } = this.props; + return getMostReadableColor( colors, colorValue ); + } + + createSetters() { + return reduce( colorMap, ( settersAccumulator, colorContext, colorAttributeName ) => { + const upperFirstColorAttributeName = upperFirst( colorAttributeName ); + const customColorAttributeName = `custom${ upperFirstColorAttributeName }`; + settersAccumulator[ `set${ upperFirstColorAttributeName }` ] = + this.createSetColor( colorAttributeName, customColorAttributeName ); + return settersAccumulator; + }, {} ); + } + + createSetColor( colorAttributeName, customColorAttributeName ) { + return ( colorValue ) => { + const colorObject = getColorObjectByColorValue( this.props.colors, colorValue ); + this.props.setAttributes( { + [ colorAttributeName ]: colorObject && colorObject.slug ? colorObject.slug : undefined, + [ customColorAttributeName ]: colorObject && colorObject.slug ? undefined : colorValue, + } ); + }; + } + + static getDerivedStateFromProps( { attributes, colors }, previousState ) { + return reduce( colorMap, ( newState, colorContext, colorAttributeName ) => { + const colorObject = getColorObjectByAttributeValues( + colors, + attributes[ colorAttributeName ], + attributes[ `custom${ upperFirst( colorAttributeName ) }` ], ); - } - }; - }, - ] ), - 'withColors' - ); -}; + + const previousColorObject = previousState[ colorAttributeName ]; + const previousColor = get( previousColorObject, [ 'color' ] ); + /** + * The "and previousColorObject" condition checks that a previous color object was already computed. + * At the start previousColorObject and colorValue are both equal to undefined + * bus as previousColorObject does not exist we should compute the object. + */ + if ( previousColor === colorObject.color && previousColorObject ) { + newState[ colorAttributeName ] = previousColorObject; + } else { + newState[ colorAttributeName ] = { + ...colorObject, + class: getColorClassName( colorContext, colorObject.slug ), + }; + } + return newState; + }, {} ); + } + + render() { + return ( + + ); + } + }; + }, + ] ); +} + +/** + * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic + * for class generation color value, retrieval and color attribute setting. + * + * Use this higher-order component to work with a custom set of colors. + * + * @example + * + * ```jsx + * const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ]; + * const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS ); + * // ... + * export default compose( + * withCustomColors( 'backgroundColor', 'borderColor' ), + * MyColorfulComponent, + * ); + * ``` + * + * @param {Array} colorsArray The array of color objects (name, slug, color, etc... ). + * + * @return {Function} Higher-order component. + */ +export function createCustomColorsHOC( colorsArray ) { + return ( ...colorTypes ) => { + const withColorPalette = withCustomColorPalette( colorsArray ); + return createHigherOrderComponent( createColorHOC( colorTypes, withColorPalette ), 'withCustomColors' ); + }; +} + +/** + * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting. + * + * For use with the default editor/theme color palette. + * + * @example + * + * ```jsx + * export default compose( + * withColors( 'backgroundColor', { textColor: 'color' } ), + * MyColorfulComponent, + * ); + * ``` + * + * @param {...(object|string)} colorTypes The arguments can be strings or objects. If the argument is an object, + * it should contain the color attribute name as key and the color context as value. + * If the argument is a string the value should be the color attribute name, + * the color context is computed by applying a kebab case transform to the value. + * Color context represents the context/place where the color is going to be used. + * The class name of the color is generated using 'has' followed by the color name + * and ending with the color context all in kebab case e.g: has-green-background-color. + * + * @return {Function} Higher-order component. + */ +export default function withColors( ...colorTypes ) { + const withColorPalette = withEditorColorPalette(); + return createHigherOrderComponent( createColorHOC( colorTypes, withColorPalette ), 'withColors' ); +} From 9fc611ea932960ed0c608a237d7497b970a97eb4 Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe Date: Fri, 18 Jan 2019 20:33:57 +0900 Subject: [PATCH 07/56] Custom HTML Block: apply editor-styles to preview mode. (#13080) --- packages/block-library/src/html/edit.js | 79 +++++++++++++++++++ packages/block-library/src/html/index.js | 46 ++--------- packages/components/src/sandbox/index.js | 15 ++-- .../editor/src/components/provider/index.js | 14 +--- packages/editor/src/editor-styles/index.js | 45 ++++++++++- packages/editor/src/index.js | 1 + 6 files changed, 143 insertions(+), 57 deletions(-) create mode 100644 packages/block-library/src/html/edit.js diff --git a/packages/block-library/src/html/edit.js b/packages/block-library/src/html/edit.js new file mode 100644 index 00000000000000..d9bbe4e07211f3 --- /dev/null +++ b/packages/block-library/src/html/edit.js @@ -0,0 +1,79 @@ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; +import { Component } from '@wordpress/element'; +import { BlockControls, PlainText, transformStyles } from '@wordpress/editor'; +import { Disabled, SandBox } from '@wordpress/components'; +import { withSelect } from '@wordpress/data'; + +class HTMLEdit extends Component { + constructor() { + super( ...arguments ); + this.state = { + isPreview: false, + styles: [], + }; + this.switchToHTML = this.switchToHTML.bind( this ); + this.switchToPreview = this.switchToPreview.bind( this ); + } + + componentDidMount() { + const { styles } = this.props; + this.setState( { styles: transformStyles( styles ) } ); + } + + switchToPreview() { + this.setState( { isPreview: true } ); + } + + switchToHTML() { + this.setState( { isPreview: false } ); + } + + render() { + const { attributes, setAttributes } = this.props; + const { isPreview, styles } = this.state; + + return ( +
+ +
+ + +
+
+ + { ( isDisabled ) => ( + ( isPreview || isDisabled ) ? ( + + ) : ( + setAttributes( { content } ) } + placeholder={ __( 'Write HTML…' ) } + aria-label={ __( 'HTML' ) } + /> + ) + ) } + </Disabled.Consumer> + </div> + ); + } +} +export default withSelect( ( select ) => { + const { getEditorSettings } = select( 'core/editor' ); + return { + styles: getEditorSettings().styles, + }; +} )( HTMLEdit ); diff --git a/packages/block-library/src/html/index.js b/packages/block-library/src/html/index.js index c7307aa53e9b49..74233c565036ec 100644 --- a/packages/block-library/src/html/index.js +++ b/packages/block-library/src/html/index.js @@ -3,10 +3,13 @@ */ import { RawHTML } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { Disabled, SandBox, SVG, Path } from '@wordpress/components'; +import { SVG, Path } from '@wordpress/components'; import { getPhrasingContentSchema } from '@wordpress/blocks'; -import { BlockControls, PlainText } from '@wordpress/editor'; -import { withState } from '@wordpress/compose'; + +/** + * Internal dependencies + */ +import edit from './edit'; export const name = 'core/html'; @@ -56,42 +59,7 @@ export const settings = { ], }, - edit: withState( { - isPreview: false, - } )( ( { attributes, setAttributes, setState, isPreview } ) => ( - <div className="wp-block-html"> - <BlockControls> - <div className="components-toolbar"> - <button - className={ `components-tab-button ${ ! isPreview ? 'is-active' : '' }` } - onClick={ () => setState( { isPreview: false } ) } - > - <span>HTML</span> - </button> - <button - className={ `components-tab-button ${ isPreview ? 'is-active' : '' }` } - onClick={ () => setState( { isPreview: true } ) } - > - <span>{ __( 'Preview' ) }</span> - </button> - </div> - </BlockControls> - <Disabled.Consumer> - { ( isDisabled ) => ( - ( isPreview || isDisabled ) ? ( - <SandBox html={ attributes.content } /> - ) : ( - <PlainText - value={ attributes.content } - onChange={ ( content ) => setAttributes( { content } ) } - placeholder={ __( 'Write HTML…' ) } - aria-label={ __( 'HTML' ) } - /> - ) - ) } - </Disabled.Consumer> - </div> - ) ), + edit: edit, save( { attributes } ) { return <RawHTML>{ attributes.content }</RawHTML>; diff --git a/packages/components/src/sandbox/index.js b/packages/components/src/sandbox/index.js index 1cd516d105c770..1862c00db97540 100644 --- a/packages/components/src/sandbox/index.js +++ b/packages/components/src/sandbox/index.js @@ -110,11 +110,13 @@ class Sandbox extends Component { // the iframe root and interfere with our mechanism for // determining the unconstrained page bounds. function removeViewportStyles( ruleOrNode ) { - [ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) { - if ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) { - ruleOrNode.style[ style ] = ''; - } - } ); + if( ruleOrNode.style ) { + [ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) { + if ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) { + ruleOrNode.style[ style ] = ''; + } + } ); + } } Array.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles ); @@ -165,6 +167,9 @@ class Sandbox extends Component { <head> <title>{ this.props.title }</title> <style dangerouslySetInnerHTML={ { __html: style } } /> + { ( this.props.styles && this.props.styles.map( + ( rules, i ) => <style key={ i } dangerouslySetInnerHTML={ { __html: rules } } /> + ) ) } </head> <body data-resizable-iframe-connected="data-resizable-iframe-connected" className={ this.props.type }> <div dangerouslySetInnerHTML={ { __html: this.props.html } } /> diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js index ebe4edf43e653a..a889bb01c14acb 100644 --- a/packages/editor/src/components/provider/index.js +++ b/packages/editor/src/components/provider/index.js @@ -6,7 +6,6 @@ import { flow, map } from 'lodash'; /** * WordPress Dependencies */ -import { compose } from '@wordpress/compose'; import { createElement, Component } from '@wordpress/element'; import { DropZoneProvider, SlotFillProvider } from '@wordpress/components'; import { withDispatch } from '@wordpress/data'; @@ -15,7 +14,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ -import { traverse, wrap, urlRewrite } from '../../editor-styles'; +import transformStyles from '../../editor-styles'; class EditorProvider extends Component { constructor( props ) { @@ -51,14 +50,9 @@ class EditorProvider extends Component { return; } - map( this.props.settings.styles, ( { css, baseURL } ) => { - const transforms = [ - wrap( '.editor-styles-wrapper' ), - ]; - if ( baseURL ) { - transforms.push( urlRewrite( baseURL ) ); - } - const updatedCSS = traverse( css, compose( transforms ) ); + const updatedStyles = transformStyles( this.props.settings.styles, '.editor-styles-wrapper' ); + + map( updatedStyles, ( updatedCSS ) => { if ( updatedCSS ) { const node = document.createElement( 'style' ); node.innerHTML = updatedCSS; diff --git a/packages/editor/src/editor-styles/index.js b/packages/editor/src/editor-styles/index.js index 35baab8d590b66..c5de582ce074c4 100644 --- a/packages/editor/src/editor-styles/index.js +++ b/packages/editor/src/editor-styles/index.js @@ -1,3 +1,42 @@ -export { default as traverse } from './traverse'; -export { default as urlRewrite } from './transforms/url-rewrite'; -export { default as wrap } from './transforms/wrap'; +/** + * External dependencies + */ +import { map } from 'lodash'; + +/** + * WordPress dependencies + */ +import { compose } from '@wordpress/compose'; + +/** + * External dependencies + */ +import traverse from './traverse'; +import urlRewrite from './transforms/url-rewrite'; +import wrap from './transforms/wrap'; + +/** + * Convert css rules. + * + * @param {Array} styles CSS rules. + * @param {string} wrapperClassName Wrapper Class Name. + * @return {Array} converted rules. + */ +const transformStyles = ( styles, wrapperClassName = '' ) => { + return map( styles, ( { css, baseURL } ) => { + const transforms = []; + if ( wrapperClassName ) { + transforms.push( wrap( wrapperClassName ) ); + } + if ( baseURL ) { + transforms.push( urlRewrite( baseURL ) ); + } + if ( transforms.length ) { + return traverse( css, compose( transforms ) ); + } + + return css; + } ); +}; + +export default transformStyles; diff --git a/packages/editor/src/index.js b/packages/editor/src/index.js index 43cf7442800ca4..7a88f75dbccb51 100644 --- a/packages/editor/src/index.js +++ b/packages/editor/src/index.js @@ -16,3 +16,4 @@ import './hooks'; export * from './components'; export * from './utils'; +export { default as transformStyles } from './editor-styles'; From e5f398c7d61c7a79bd106756840e2efb30a6d7e9 Mon Sep 17 00:00:00 2001 From: imath <imathi.eu@outlook.fr> Date: Fri, 18 Jan 2019 13:14:10 +0100 Subject: [PATCH 08/56] Missing Post Type supports in Options Modal (#12394) --- lib/client-assets.php | 33 +++++++++++++------ .../src/components/options-modal/index.js | 29 +++++++++++----- .../test/__snapshots__/index.js.snap | 31 ++++++++++------- 3 files changed, 63 insertions(+), 30 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index d3e84f1b9779ca..42624b3e1c2943 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -1013,7 +1013,7 @@ function gutenberg_get_available_image_sizes() { function gutenberg_editor_scripts_and_styles( $hook ) { $is_demo = isset( $_GET['gutenberg-demo'] ); - global $wp_scripts; + global $wp_scripts, $wp_meta_boxes; // Add "wp-hooks" as dependency of "heartbeat". $heartbeat_script = $wp_scripts->query( 'heartbeat', 'registered' ); @@ -1335,15 +1335,18 @@ function gutenberg_editor_scripts_and_styles( $hook ) { $editor_settings['templateLock'] = ! empty( $post_type_object->template_lock ) ? $post_type_object->template_lock : false; } - $init_script = <<<JS - ( function() { - window._wpLoadGutenbergEditor = new Promise( function( resolve ) { - wp.domReady( function() { - resolve( wp.editPost.initializeEditor( 'editor', "%s", %d, %s, %s ) ); - } ); - } ); -} )(); -JS; + $current_screen = get_current_screen(); + $core_meta_boxes = array(); + + // Make sure the current screen is set as well as the normal core metaboxes. + if ( isset( $current_screen->id ) && isset( $wp_meta_boxes[ $current_screen->id ]['normal']['core'] ) ) { + $core_meta_boxes = $wp_meta_boxes[ $current_screen->id ]['normal']['core']; + } + + // Check if the Custom Fields meta box has been removed at some point. + if ( ! isset( $core_meta_boxes['postcustom'] ) || ! $core_meta_boxes['postcustom'] ) { + unset( $editor_settings['enableCustomFields'] ); + } /** * Filters the settings to pass to the block editor. @@ -1355,6 +1358,16 @@ function gutenberg_editor_scripts_and_styles( $hook ) { */ $editor_settings = apply_filters( 'block_editor_settings', $editor_settings, $post ); + $init_script = <<<JS + ( function() { + window._wpLoadGutenbergEditor = new Promise( function( resolve ) { + wp.domReady( function() { + resolve( wp.editPost.initializeEditor( 'editor', "%s", %d, %s, %s ) ); + } ); + } ); +} )(); +JS; + $script = sprintf( $init_script, $post->post_type, diff --git a/packages/edit-post/src/components/options-modal/index.js b/packages/edit-post/src/components/options-modal/index.js index 51b40719eb4881..1d6528815b59ce 100644 --- a/packages/edit-post/src/components/options-modal/index.js +++ b/packages/edit-post/src/components/options-modal/index.js @@ -10,7 +10,7 @@ import { Modal } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { withSelect, withDispatch } from '@wordpress/data'; import { compose } from '@wordpress/compose'; -import { PostTaxonomies, PostExcerptCheck, PageAttributesCheck } from '@wordpress/editor'; +import { PostTaxonomies, PostExcerptCheck, PageAttributesCheck, PostFeaturedImageCheck, PostTypeSupportCheck } from '@wordpress/editor'; /** * Internal dependencies @@ -25,7 +25,7 @@ import MetaBoxesSection from './meta-boxes-section'; const MODAL_NAME = 'edit-post/options'; -export function OptionsModal( { isModalActive, closeModal } ) { +export function OptionsModal( { isModalActive, isViewable, closeModal } ) { if ( ! isModalActive ) { return null; } @@ -42,7 +42,9 @@ export function OptionsModal( { isModalActive, closeModal } ) { <EnableTipsOption label={ __( 'Enable Tips' ) } /> </Section> <Section title={ __( 'Document Panels' ) }> - <EnablePanelOption label={ __( 'Permalink' ) } panelName="post-link" /> + { isViewable && ( + <EnablePanelOption label={ __( 'Permalink' ) } panelName="post-link" /> + ) } <PostTaxonomies taxonomyWrapper={ ( content, taxonomy ) => ( <EnablePanelOption @@ -51,11 +53,15 @@ export function OptionsModal( { isModalActive, closeModal } ) { /> ) } /> - <EnablePanelOption label={ __( 'Featured Image' ) } panelName="featured-image" /> + <PostFeaturedImageCheck> + <EnablePanelOption label={ __( 'Featured Image' ) } panelName="featured-image" /> + </PostFeaturedImageCheck> <PostExcerptCheck> <EnablePanelOption label={ __( 'Excerpt' ) } panelName="post-excerpt" /> </PostExcerptCheck> - <EnablePanelOption label={ __( 'Discussion' ) } panelName="discussion-panel" /> + <PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }> + <EnablePanelOption label={ __( 'Discussion' ) } panelName="discussion-panel" /> + </PostTypeSupportCheck> <PageAttributesCheck> <EnablePanelOption label={ __( 'Page Attributes' ) } panelName="page-attributes" /> </PageAttributesCheck> @@ -66,9 +72,16 @@ export function OptionsModal( { isModalActive, closeModal } ) { } export default compose( - withSelect( ( select ) => ( { - isModalActive: select( 'core/edit-post' ).isModalActive( MODAL_NAME ), - } ) ), + withSelect( ( select ) => { + const { getEditedPostAttribute } = select( 'core/editor' ); + const { getPostType } = select( 'core' ); + const postType = getPostType( getEditedPostAttribute( 'type' ) ); + + return { + isModalActive: select( 'core/edit-post' ).isModalActive( MODAL_NAME ), + isViewable: get( postType, [ 'viewable' ], false ), + }; + } ), withDispatch( ( dispatch ) => { return { closeModal: () => dispatch( 'core/edit-post' ).closeModal(), diff --git a/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap b/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap index 1367ebd0834191..94d989e492e4a0 100644 --- a/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap +++ b/packages/edit-post/src/components/options-modal/test/__snapshots__/index.js.snap @@ -25,27 +25,34 @@ exports[`OptionsModal should match snapshot when the modal is active 1`] = ` <Section title="Document Panels" > - <WithSelect(IfCondition(WithDispatch(BaseOption))) - label="Permalink" - panelName="post-link" - /> <WithSelect(PostTaxonomies) taxonomyWrapper={[Function]} /> - <WithSelect(IfCondition(WithDispatch(BaseOption))) - label="Featured Image" - panelName="featured-image" - /> + <PostFeaturedImageCheck> + <WithSelect(IfCondition(WithDispatch(BaseOption))) + label="Featured Image" + panelName="featured-image" + /> + </PostFeaturedImageCheck> <PostExcerptCheck> <WithSelect(IfCondition(WithDispatch(BaseOption))) label="Excerpt" panelName="post-excerpt" /> </PostExcerptCheck> - <WithSelect(IfCondition(WithDispatch(BaseOption))) - label="Discussion" - panelName="discussion-panel" - /> + <WithSelect(PostTypeSupportCheck) + supportKeys={ + Array [ + "comments", + "trackbacks", + ] + } + > + <WithSelect(IfCondition(WithDispatch(BaseOption))) + label="Discussion" + panelName="discussion-panel" + /> + </WithSelect(PostTypeSupportCheck)> <WithSelect(PageAttributesCheck)> <WithSelect(IfCondition(WithDispatch(BaseOption))) label="Page Attributes" From 91f791fbe77d01b569ab960c60429468f8ffd9cf Mon Sep 17 00:00:00 2001 From: Dharmesh Patel <10613171+iamdharmesh@users.noreply.github.com> Date: Fri, 18 Jan 2019 19:08:56 +0530 Subject: [PATCH 09/56] Replaced "MenuGroup" with "NavigableMenu" in Warning Component. (Fixed:#12503) (#12522) --- packages/components/src/menu-group/index.js | 2 +- packages/editor/src/components/warning/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/menu-group/index.js b/packages/components/src/menu-group/index.js index 3e6856478d34b3..f5b2aff60337ed 100644 --- a/packages/components/src/menu-group/index.js +++ b/packages/components/src/menu-group/index.js @@ -35,7 +35,7 @@ export function MenuGroup( { { label && <div className="components-menu-group__label" id={ labelId }>{ label }</div> } - <NavigableMenu orientation="vertical" aria-labelledby={ labelId }> + <NavigableMenu orientation="vertical" aria-labelledby={ label ? labelId : null }> { children } </NavigableMenu> </div> diff --git a/packages/editor/src/components/warning/index.js b/packages/editor/src/components/warning/index.js index 52a1b410431692..1aa00128532873 100644 --- a/packages/editor/src/components/warning/index.js +++ b/packages/editor/src/components/warning/index.js @@ -40,7 +40,7 @@ function Warning( { className, actions, children, secondaryActions } ) { /> ) } renderContent={ () => ( - <MenuGroup label={ __( 'More options' ) }> + <MenuGroup> { secondaryActions.map( ( item, pos ) => <MenuItem onClick={ item.onClick } key={ pos }> { item.title } From 48598b9269c755875c9f08175688f30e8f6b69ae Mon Sep 17 00:00:00 2001 From: John <johng75@gmail.com> Date: Fri, 18 Jan 2019 14:13:26 +0000 Subject: [PATCH 10/56] Add block warning overwrite (#8166) ## Description Adds an option to the invalid block warning menu to fix the problem by re-creating the block with the current content, overwriting anything that is invalid. This was suggested in #7604 This is similar to the 'convert to blocks' option, but ensures the block stays of the same type. Contrast this with 'convert to blocks' which could convert to another block type, and could end in multiple blocks. ![edit_post_ _wordpress_latest_ _wordpress](https://user-images.githubusercontent.com/1277682/44906590-3dee2f00-ad0d-11e8-9a3a-7b2113aebde1.jpg) In a lot of situations 'overwrite' and 'convert to blocks' will result in the same conversion so it's debatable whether this is a useful enough conversion to include but I'm raising it here for opinion. This is the same overwrite function that used to exist in older versions of Gutenberg. ## How has this been tested? 1. Add a paragraph block 2. Edit block HTML and paste `<p>this is a paragraph</p><blockquote>invalid content</blockquote>` 3. Deselect the block to trigger invalid block warning 4. Pick 'Convert to blocks' 5. Verify that the invalid block is converted to two blocks - a corrected paragraph and a blockquote ![edit_post_ _wordpress_latest_ _wordpress](https://user-images.githubusercontent.com/1277682/44906652-6e35cd80-ad0d-11e8-9652-af1cbc19ac1f.jpg) 6. Reset block HTML to (2) and pick 'Overwrite with valid block' 7. Verify that the invalid block is converted to the first paragraph 'this is a paragraph', with the blockquote removed ## Types of changes New feature for invalid block warning. Should not affect anything else ## Checklist: - [ ] My code is tested. - [ ] My code follows the WordPress code style. <!-- Check code: `npm run lint`, Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/ --> - [ ] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ --> - [ ] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ --> --- .../src/components/block-list/block-invalid-warning.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/block-list/block-invalid-warning.js b/packages/editor/src/components/block-list/block-invalid-warning.js index bc4555b1a3f0b0..265e36c78a2e89 100644 --- a/packages/editor/src/components/block-list/block-invalid-warning.js +++ b/packages/editor/src/components/block-list/block-invalid-warning.js @@ -36,11 +36,12 @@ export class BlockInvalidWarning extends Component { } render() { - const { convertToHTML, convertToBlocks, convertToClassic, block } = this.props; + const { convertToHTML, convertToBlocks, convertToClassic, attemptBlockRecovery, block } = this.props; const hasHTMLBlock = !! getBlockType( 'core/html' ); const { compare } = this.state; const hiddenActions = [ { title: __( 'Convert to Classic Block' ), onClick: convertToClassic }, + { title: __( 'Attempt Block Recovery' ), onClick: attemptBlockRecovery }, ]; if ( compare ) { @@ -96,6 +97,7 @@ const blockToHTML = ( block ) => createBlock( 'core/html', { const blockToBlocks = ( block ) => rawHandler( { HTML: block.originalContent, } ); +const recoverBlock = ( { name, attributes, innerBlocks } ) => createBlock( name, attributes, innerBlocks ); export default compose( [ withSelect( ( select, { clientId } ) => ( { @@ -114,6 +116,9 @@ export default compose( [ convertToBlocks() { replaceBlock( block.clientId, blockToBlocks( block ) ); }, + attemptBlockRecovery() { + replaceBlock( block.clientId, recoverBlock( block ) ); + }, }; } ), ] )( BlockInvalidWarning ); From 5017388df003fbb85faa101d4c4c824d8a2e591c Mon Sep 17 00:00:00 2001 From: Joen Asmussen <joen@automattic.com> Date: Fri, 18 Jan 2019 16:37:42 +0100 Subject: [PATCH 11/56] Try better color swatch selection indicator (#13274) --- packages/components/src/color-palette/index.js | 2 ++ packages/components/src/color-palette/style.scss | 15 ++++++++++++--- .../test/__snapshots__/index.js.snap | 6 ++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/components/src/color-palette/index.js b/packages/components/src/color-palette/index.js index 5ab52f277df71e..3dfe358954e1f3 100644 --- a/packages/components/src/color-palette/index.js +++ b/packages/components/src/color-palette/index.js @@ -8,6 +8,7 @@ import { map } from 'lodash'; * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; +import Dashicon from '../dashicon'; /** * Internal dependencies @@ -49,6 +50,7 @@ export default function ColorPalette( { colors, disableCustomColors = false, val aria-pressed={ value === color } /> </Tooltip> + { value === color && <Dashicon icon="saved" /> } </div> ); } ) } diff --git a/packages/components/src/color-palette/style.scss b/packages/components/src/color-palette/style.scss index 6627ad0c12420d..b5c5d9686e25f5 100644 --- a/packages/components/src/color-palette/style.scss +++ b/packages/components/src/color-palette/style.scss @@ -44,6 +44,13 @@ $color-palette-circle-spacing: 14px; &.is-active { box-shadow: inset 0 0 0 4px; + border: $border-width solid $dark-gray-400; + + & + .dashicons-saved { + position: absolute; + left: 4px; + top: 4px; + } } &::after { @@ -53,7 +60,7 @@ $color-palette-circle-spacing: 14px; left: 0; bottom: 0; right: 0; - border-radius: 50%; + border-radius: $radius-round; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); } @@ -61,13 +68,15 @@ $color-palette-circle-spacing: 14px; outline: none; &::after { content: ""; - border: $border-width solid $dark-gray-400; + position: absolute; + border: #{ $border-width * 2 } solid $dark-gray-400; width: 32px; height: 32px; position: absolute; top: -2px; left: -2px; - border-radius: 50%; + border-radius: $radius-round; + box-shadow: inset 0 0 0 2px $white; } } } diff --git a/packages/components/src/color-palette/test/__snapshots__/index.js.snap b/packages/components/src/color-palette/test/__snapshots__/index.js.snap index cb4980913feb56..cbb6798ae54449 100644 --- a/packages/components/src/color-palette/test/__snapshots__/index.js.snap +++ b/packages/components/src/color-palette/test/__snapshots__/index.js.snap @@ -133,6 +133,9 @@ exports[`ColorPalette should allow disabling custom color picker 1`] = ` type="button" /> </Tooltip> + <Dashicon + icon="saved" + /> </div> <div className="components-color-palette__item-wrapper" @@ -212,6 +215,9 @@ exports[`ColorPalette should render a dynamic toolbar of colors 1`] = ` type="button" /> </Tooltip> + <Dashicon + icon="saved" + /> </div> <div className="components-color-palette__item-wrapper" From 0c1f125ed5d2b77ad10673a6bb6970d7b66d98be Mon Sep 17 00:00:00 2001 From: Joen Asmussen <joen@automattic.com> Date: Fri, 18 Jan 2019 16:58:41 +0100 Subject: [PATCH 12/56] Improve scrolling in fullscreen mode, notably for Edge (#13327) In https://github.com/WordPress/gutenberg/pull/12644, we changed the behavior of scrolling for the main content area slightly, to address issues with scrolling on small screens. As part of that, there was one small issue that made it slightly harder to scroll this main content area, only when in fullscreen mode in Microsoft Edge. This PR fixes that. Another side effect of that prior PR was that it unset some of the scrolling rules that prevented CSS bleed (when you scroll to the end of the Block Library and proceed to scroll the body content). This PR restores that. --- packages/edit-post/src/components/layout/style.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/edit-post/src/components/layout/style.scss b/packages/edit-post/src/components/layout/style.scss index 7e31582af07bd7..3aa896af7b377b 100644 --- a/packages/edit-post/src/components/layout/style.scss +++ b/packages/edit-post/src/components/layout/style.scss @@ -114,11 +114,10 @@ margin-left: $admin-sidebar-width-collapsed; } - // Undo the above rules for fullscreen mode. + // Provide special rules for fullscreen mode. body.is-fullscreen-mode & { margin-left: 0 !important; - position: relative; - top: inherit; + top: $header-height; } } From 837fda74400f6af9810a4ef0b3bb33d22eb0105a Mon Sep 17 00:00:00 2001 From: Sheri Bigelow <sheri@designsimply.com> Date: Fri, 18 Jan 2019 10:58:33 -0700 Subject: [PATCH 13/56] Documentation: mention workflow and high priority labeled issues (#13362) Workflow labels are important for interacting with contributors at all levels and should be encouraged. We should also make sure to communicate well with other groups to ask them to use these workflows, such as the Design Team for the `Needs Design Feedback` label, the Gutenberg Team for the `Needs Decision` label, and all contributors or Support Team members who are developers for the `Needs Technical Feedback` label. This PR adds a note about workflow labels and also mentions that high priority issues should have an assignee and/or be in an active milestone. I also updated the `Accessibility` label to `Needs Accessibility Feedback` as it makes more sense for the description in this document. --- docs/contributors/repository-management.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/contributors/repository-management.md b/docs/contributors/repository-management.md index 132f46d0df1edd..d4e8df0ebf6aa7 100644 --- a/docs/contributors/repository-management.md +++ b/docs/contributors/repository-management.md @@ -25,13 +25,17 @@ Any issues that are irrelevant or not actionable should be closed, because they To better organize the issue backlog, all issues should have [one or more labels](https://github.com/WordPress/gutenberg/labels). Here are some you might commonly see: -- [Accessibility](https://github.com/WordPress/gutenberg/labels/Accessibility) - Changes that impact accessibility and need corresponding review (e.g. markup changes). +- [Needs Accessibility Feedback](https://github.com/WordPress/gutenberg/labels/Accessibility) - Changes that impact accessibility and need corresponding review (e.g. markup changes). - [Needs Design Feedback](https://github.com/WordPress/gutenberg/labels/Needs%20Design%20Feedback) - Changes that modify the design or user experience in some way and need sign-off. - [[Type] Bug](https://github.com/WordPress/gutenberg/labels/%5BType%5D%20Bug) - An existing feature is broken in some way. - [[Type] Enhancement](https://github.com/WordPress/gutenberg/labels/%5BType%5D%20Enhancement) - Gutenberg would be better with this improvement added. - [[Type] Plugin / Extension Conflict](https://github.com/WordPress/gutenberg/labels/%5BType%5D%20Plugin%20%2F%20Extension%20Conflict) - Documentation of a conflict between Gutenberg and a plugin or extension. The plugin author should be informed and provided documentation on how to address. - [[Status] Needs More Info](https://github.com/WordPress/gutenberg/labels/%5BStatus%5D%20Needs%20More%20Info) - The issue needs more information in order to be actionable and relevant. Typically this requires follow-up from the original reporter. +Workflow labels may be applied as needed and start with “Needs”. Ideally, each workflow label will have a group that follows it, such as the Accessibility Team for `Needs Accessibility Feedback`, the Testing Team for `Needs Testing`, etc. + +`Priority High` and `Priority OMGWTFBBQ` issues should have an assignee and/or be in an active milestone. + [Check out the label directory](https://github.com/WordPress/gutenberg/labels) for a listing of all labels. ### Milestones From 616e7f7b8ee484c026dd111b29d8fd850e8e3ea7 Mon Sep 17 00:00:00 2001 From: Daniel Richards <daniel.p.richards@gmail.com> Date: Mon, 21 Jan 2019 16:53:36 +0800 Subject: [PATCH 14/56] Bump plugin version to 4.9-rc.1 (#13396) --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 2df698bd414130..dd6c91af48197a 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -3,7 +3,7 @@ * Plugin Name: Gutenberg * Plugin URI: https://github.com/WordPress/gutenberg * Description: Printing since 1440. This is the development plugin for the new block editor in core. - * Version: 4.8.0 + * Version: 4.9.0-rc.1 * Author: Gutenberg Team * * @package gutenberg diff --git a/package-lock.json b/package-lock.json index 1566caa308054c..acb449cec52f59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "4.8.0", + "version": "4.9.0-rc.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 05f1da17f29ba6..a50ef6c984a703 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "4.8.0", + "version": "4.9.0-rc.1", "private": true, "description": "A new WordPress editor experience", "repository": "git+https://github.com/WordPress/gutenberg.git", From 4560d7bcfcf1823a48ed9556da2e9e9d5c9bb4fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= <grzegorz@gziolo.pl> Date: Mon, 21 Jan 2019 10:34:11 +0100 Subject: [PATCH 15/56] Chore: Update browserlist package to fix test errors (#13395) * Chore: Update browserlist package to fix test errors * Update more dependencies to ensure that browserslit uses the latest version --- package-lock.json | 1638 +++++++++++++++++++------- package.json | 2 +- packages/postcss-themes/package.json | 4 +- packages/scripts/package.json | 2 +- 4 files changed, 1209 insertions(+), 437 deletions(-) diff --git a/package-lock.json b/package-lock.json index acb449cec52f59..ab56fd83b74884 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,40 +713,6 @@ "invariant": "^2.2.2", "js-levenshtein": "^1.1.3", "semver": "^5.3.0" - }, - "dependencies": { - "browserslist": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.1.0.tgz", - "integrity": "sha512-kQBKB8hnq1SRfSpwHDpM1JNHAyk9fydW8hIDvndR2ijTFKIlBPEvkJkCt8JznOugdm12/YCaRgyq/sqDGz9PwA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000878", - "electron-to-chromium": "^1.3.61", - "node-releases": "^1.0.0-alpha.11" - } - }, - "caniuse-lite": { - "version": "1.0.30000878", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz", - "integrity": "sha512-/dCGTdLCnjVJno1mFRn7Y6eit3AYaeFzSrMQHCoK0LEQaWl5snuLex1Ky4b8/Qu2ig5NgTX4cJx65hH9546puA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.61", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.61.tgz", - "integrity": "sha512-XjTdsm6x71Y48lF9EEvGciwXD70b20g0t+3YbrE+0fPFutqV08DSNrZXkoXAp3QuzX7TpL/OW+/VsNoR9GkuNg==", - "dev": true - }, - "node-releases": { - "version": "1.0.0-alpha.11", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.0-alpha.11.tgz", - "integrity": "sha512-CaViu+2FqTNYOYNihXa5uPS/zry92I3vPU4nCB6JB3OeZ2UGtOpF5gRwuN4+m3hbEcL47bOXyun1jX2iC+3uEQ==", - "dev": true, - "requires": { - "semver": "^5.3.0" - } - } } }, "@babel/runtime": { @@ -2109,6 +2075,33 @@ "integrity": "sha512-53ElVDSnZeFUUFIYzI8WLQ25IhWzb6vbddNp8UHlXQyU0ET2RhV5zg0NfubzU7iNMh5bBXb0htCzfvrSVNgzaQ==", "dev": true }, + "@types/unist": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.2.tgz", + "integrity": "sha512-iHI60IbyfQilNubmxsq4zqSjdynlmc2Q/QvH9kjzg9+CCYVVzq1O6tc7VBzSygIwnmOt07w80IG6HDQvjv3Liw==", + "dev": true + }, + "@types/vfile": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz", + "integrity": "sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/unist": "*", + "@types/vfile-message": "*" + } + }, + "@types/vfile-message": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/vfile-message/-/vfile-message-1.0.1.tgz", + "integrity": "sha512-mlGER3Aqmq7bqR1tTTIVHq8KSAFFRyGbrxuM8C/H82g6k7r2fS+IMEkIu3D7JHzG10NvPdR8DNx0jr0pwpp4dA==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/unist": "*" + } + }, "@webassemblyjs/ast": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.4.3.tgz", @@ -2762,8 +2755,8 @@ "dev": true, "requires": { "@babel/runtime": "^7.0.0", - "autoprefixer": "^8.2.0", - "postcss": "^6.0.16", + "autoprefixer": "^9.4.5", + "postcss": "^7.0.13", "postcss-color-function": "^4.0.1" } }, @@ -2810,7 +2803,7 @@ "puppeteer": "1.6.1", "read-pkg-up": "^1.0.1", "resolve-bin": "^0.4.0", - "stylelint": "^9.5.0", + "stylelint": "^9.10.1", "stylelint-config-wordpress": "^13.1.0" } }, @@ -3329,17 +3322,25 @@ "dev": true }, "autoprefixer": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.2.0.tgz", - "integrity": "sha512-xBVQpGAcSNNS1PBnEfT+F9VF8ZJeoKZ121I3OVQ0n1F0SqVuj4oLI6yFeEviPV8Z/GjoqBRXcYis0oSS8zjNEg==", + "version": "9.4.5", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.5.tgz", + "integrity": "sha512-M602C0ZxzFpJKqD4V6eq2j+K5CkzlhekCrcQupJmAOrPEZjWJyj/wSeo6qRSNoN6M3/9mtLPQqTTrABfReytQg==", "dev": true, "requires": { - "browserslist": "^3.2.0", - "caniuse-lite": "^1.0.30000817", + "browserslist": "^4.4.0", + "caniuse-lite": "^1.0.30000928", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^6.0.20", - "postcss-value-parser": "^3.2.3" + "postcss": "^7.0.11", + "postcss-value-parser": "^3.3.1" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } } }, "autosize": { @@ -4869,13 +4870,31 @@ } }, "browserslist": { - "version": "3.2.8", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz", - "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", + "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000844", - "electron-to-chromium": "^1.3.47" + "caniuse-lite": "^1.0.30000929", + "electron-to-chromium": "^1.3.103", + "node-releases": "^1.1.3" + }, + "dependencies": { + "electron-to-chromium": { + "version": "1.3.103", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.103.tgz", + "integrity": "sha512-tObPqGmY9X8MUM8i3MEimYmbnLLf05/QV5gPlkR8MQ3Uj8G8B2govE1U4cQcBYtv3ymck9Y8cIOu4waoiykMZQ==", + "dev": true + }, + "node-releases": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.3.tgz", + "integrity": "sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + } } }, "bser": { @@ -5102,9 +5121,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000865", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz", - "integrity": "sha512-vs79o1mOSKRGv/1pSkp4EXgl4ZviWeYReXw60XfacPU64uQWZwJT6vZNmxRF9O+6zu71sJwMxLK5JXxbzuVrLw==", + "version": "1.0.30000929", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000929.tgz", + "integrity": "sha512-n2w1gPQSsYyorSVYqPMqbSaz1w7o9ZC8VhOEGI9T5MfGDzp7sbopQxG6GaQmYsaq13Xfx/mkxJUWC1Dz3oZfzw==", "dev": true }, "capture-exit": { @@ -6563,6 +6582,25 @@ "requires": { "postcss": "^6.0.0", "timsort": "^0.3.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "css-select": { @@ -6627,6 +6665,25 @@ "cssnano-preset-default": "^4.0.0", "is-resolvable": "^1.0.0", "postcss": "^6.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "cssnano-preset-default": { @@ -6665,6 +6722,25 @@ "postcss-reduce-transforms": "^4.0.0", "postcss-svgo": "^4.0.0", "postcss-unique-selectors": "^4.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "cssnano-util-get-arguments": { @@ -6686,6 +6762,25 @@ "dev": true, "requires": { "postcss": "^6.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "cssnano-util-same-parent": { @@ -8632,6 +8727,12 @@ "write": "^0.2.1" } }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "flatten": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", @@ -13204,9 +13305,9 @@ "dev": true }, "known-css-properties": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.6.1.tgz", - "integrity": "sha512-nQRpMcHm1cQ6gmztdvLcIvxocznSMqH/y6XtERrWrHaymOYdDGroRqetJvJycxGEr1aakXiigDgn7JnzuXlk6A==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz", + "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==", "dev": true }, "lazy-cache": { @@ -16500,21 +16601,52 @@ "dev": true }, "postcss": { - "version": "6.0.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", - "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.13.tgz", + "integrity": "sha512-h8SY6kQTd1wISHWjz+E6cswdhMuyBZRb16pSTv3W4zYZ3/YbyWeJdNUeOXB5IdZqE1U76OUEjjjqsC3z2f3hVg==", "dev": true, "requires": { - "chalk": "^2.4.1", + "chalk": "^2.4.2", "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "supports-color": "^6.1.0" }, "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } } } }, @@ -16528,6 +16660,25 @@ "postcss": "^6.0.0", "postcss-selector-parser": "^2.2.2", "reduce-css-calc": "^2.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-color-function": { @@ -16540,6 +16691,25 @@ "postcss": "^6.0.1", "postcss-message-helpers": "^2.0.0", "postcss-value-parser": "^3.3.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-colormin": { @@ -16585,6 +16755,23 @@ "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -16596,6 +16783,25 @@ "requires": { "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-discard-comments": { @@ -16605,6 +16811,25 @@ "dev": true, "requires": { "postcss": "^6.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-discard-duplicates": { @@ -16614,6 +16839,25 @@ "dev": true, "requires": { "postcss": "^6.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-discard-empty": { @@ -16623,6 +16867,25 @@ "dev": true, "requires": { "postcss": "^6.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-discard-overridden": { @@ -16632,16 +16895,35 @@ "dev": true, "requires": { "postcss": "^6.0.0" - } - }, - "postcss-discard-unused": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", - "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", - "dev": true, - "requires": { - "postcss": "^5.0.14", - "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "postcss-discard-unused": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz", + "integrity": "sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=", + "dev": true, + "requires": { + "postcss": "^5.0.14", + "uniqs": "^2.0.0" }, "dependencies": { "ansi-regex": { @@ -16796,111 +17078,200 @@ } }, "postcss-html": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.33.0.tgz", - "integrity": "sha512-3keDoRG0o8bJZKe/QzkOPUD3GQQvAmYhIAtsGrgTxIXB6xZnSQq3gwPjCEd2IAUtz9/Fkus70XGm6xJEZ+bAmg==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz", + "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==", "dev": true, "requires": { - "htmlparser2": "^3.9.2" + "htmlparser2": "^3.10.0" + }, + "dependencies": { + "htmlparser2": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.0.tgz", + "integrity": "sha512-J1nEUGv+MkXS0weHNWVKJJ+UrLfePxRWpN3C9bEi9fLxL2+ggW94DQvgYVXsaT30PGwYRIZKNZXuyMhp3Di4bQ==", + "dev": true, + "requires": { + "domelementtype": "^1.3.0", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.0.6" + } + }, + "readable-stream": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", + "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } } }, "postcss-jsx": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.33.0.tgz", - "integrity": "sha512-+ZH4FyxQel2O5uYkNKBnDdW2jCwIb5HwwyFsKuEI164Vmq9Wm07nT2lj65P1qDSRXP2Ik05DrSHzY8Hmt5VP4A==", - "dev": true, - "requires": { - "@babel/core": "^7.0.0-rc.1", - "postcss-styled": ">=0.33.0" - } - }, - "postcss-less": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-2.0.0.tgz", - "integrity": "sha512-pPNsVnpCB13nBMOcl5GVh8JGmB0JGFjqkLUDzKdVpptFFKEe9wFdEzvh2j4lD2AD+7qcrUfw9Ta+oi5+Fw7jjQ==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.0.tgz", + "integrity": "sha512-/lWOSXSX5jlITCKFkuYU2WLFdrncZmjSVyNpHAunEgirZXLwI8RjU556e3Uz4mv0WVHnJA9d3JWb36lK9Yx99g==", "dev": true, "requires": { - "postcss": "^5.2.16" + "@babel/core": ">=7.1.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "@babel/core": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.2.2.tgz", + "integrity": "sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.2.2", + "@babel/helpers": "^7.2.0", + "@babel/parser": "^7.2.2", + "@babel/template": "^7.2.2", + "@babel/traverse": "^7.2.2", + "@babel/types": "^7.2.2", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.10", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "@babel/generator": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.2.tgz", + "integrity": "sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==", + "dev": true, + "requires": { + "@babel/types": "^7.2.2", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "@babel/helpers": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.2.0.tgz", + "integrity": "sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A==", + "dev": true, + "requires": { + "@babel/template": "^7.1.2", + "@babel/traverse": "^7.1.5", + "@babel/types": "^7.2.0" + } + }, + "@babel/parser": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.3.tgz", + "integrity": "sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA==", "dev": true }, - "postcss": { - "version": "5.2.18", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", - "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "@babel/template": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz", + "integrity": "sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==", "dev": true, "requires": { - "chalk": "^1.1.3", - "js-base64": "^2.1.9", - "source-map": "^0.5.6", - "supports-color": "^3.2.3" + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.2.2", + "@babel/types": "^7.2.2" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "@babel/traverse": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.2.2", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.0.0", + "@babel/parser": "^7.2.3", + "@babel/types": "^7.2.2", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.10" } }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "@babel/types": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz", + "integrity": "sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==", "dev": true, "requires": { - "has-flag": "^1.0.0" + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" } + }, + "json5": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, + "postcss-less": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.1.tgz", + "integrity": "sha512-yVa0hb03p7xj914Z4qDDA/PGwXYvCEfjJizWVYQvnEQr8SgJ098qejCvbCGk1dDYQpQEGKkvYHQCo66DwTocjg==", + "dev": true, + "requires": { + "postcss": "^7.0.3" + } + }, "postcss-markdown": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.33.0.tgz", - "integrity": "sha512-JZtetO15t5nNpymHDbRhuiOF8yJm1btrbUBP3iL39yLTiY8oChCsnCKfQjEuHB9+85fku5MoU/bRgQ8K45klMg==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz", + "integrity": "sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==", "dev": true, "requires": { - "remark": "^9.0.0", + "remark": "^10.0.1", "unist-util-find-all-after": "^1.0.2" } }, @@ -17001,6 +17372,25 @@ "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0", "stylehacks": "^4.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-merge-rules": { @@ -17028,6 +17418,17 @@ "node-releases": "^1.0.0-alpha.10" } }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, "postcss-selector-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", @@ -17038,6 +17439,12 @@ "indexes-of": "^1.0.1", "uniq": "^1.0.1" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -17055,6 +17462,25 @@ "requires": { "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-minify-gradients": { @@ -17067,6 +17493,25 @@ "is-color-stop": "^1.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-minify-params": { @@ -17080,6 +17525,25 @@ "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0", "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-minify-selectors": { @@ -17094,6 +17558,17 @@ "postcss-selector-parser": "^3.0.0" }, "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, "postcss-selector-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", @@ -17104,6 +17579,12 @@ "indexes-of": "^1.0.1", "uniq": "^1.0.1" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -17114,6 +17595,25 @@ "dev": true, "requires": { "postcss": "^6.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-display-values": { @@ -17125,6 +17625,25 @@ "cssnano-util-get-match": "^4.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-positions": { @@ -17137,6 +17656,25 @@ "has": "^1.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-repeat-style": { @@ -17149,6 +17687,25 @@ "cssnano-util-get-match": "^4.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-string": { @@ -17160,6 +17717,25 @@ "has": "^1.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-timing-functions": { @@ -17171,6 +17747,25 @@ "cssnano-util-get-match": "^4.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-unicode": { @@ -17181,6 +17776,25 @@ "requires": { "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-normalize-url": { @@ -17200,6 +17814,23 @@ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.2.0.tgz", "integrity": "sha512-WvF3Myk0NhXkG8S9bygFM4IC1KOvnVJGq0QoGeoqOYOBeinBZp5ybW3QuYbTc89lkWBMM9ZBO4QGRoc0353kKA==", "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -17211,6 +17842,25 @@ "requires": { "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-ordered-values": { @@ -17222,6 +17872,25 @@ "cssnano-util-get-arguments": "^4.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-reduce-idents": { @@ -17327,6 +17996,23 @@ "electron-to-chromium": "^1.3.52", "node-releases": "^1.0.0-alpha.10" } + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -17340,18 +18026,45 @@ "has": "^1.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-reporter": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-5.0.0.tgz", - "integrity": "sha512-rBkDbaHAu5uywbCR2XE8a25tats3xSOsGNx6mppK6Q9kSFGKc/FyAzfci+fWM2l+K402p1D0pNcfDGxeje5IKg==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz", + "integrity": "sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==", "dev": true, "requires": { - "chalk": "^2.0.1", - "lodash": "^4.17.4", - "log-symbols": "^2.0.0", - "postcss": "^6.0.8" + "chalk": "^2.4.1", + "lodash": "^4.17.11", + "log-symbols": "^2.2.0", + "postcss": "^7.0.7" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } } }, "postcss-resolve-nested-selector": { @@ -17367,54 +18080,16 @@ "dev": true, "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.2.tgz", - "integrity": "sha512-fmaUY5370keLUTx+CnwRxtGiuFTcNBLQBqr1oE3WZ/euIYmGAo0OAgOhVJ3ByDnVmOR3PK+0V9VebzfjRIUcqw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "postcss-sass": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.2.tgz", - "integrity": "sha512-0HgxikiZ07VKYr98KT+k7/rAzyMgZlP+3+R8vUti56T2dPdhW0OhPGDQzddxY/N2iDtBVZQqCHRDA09j5I6EWg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz", + "integrity": "sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==", "dev": true, "requires": { - "gonzales-pe": "4.2.3", - "postcss": "6.0.22" - }, - "dependencies": { - "postcss": { - "version": "6.0.22", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.22.tgz", - "integrity": "sha512-Toc9lLoUASwGqxBSJGTVcOQiDqjK+Z2XlWBg+IgYwQMY9vA2f7iMpXVc1GpPcfTSyM5lkxNo0oDwDRO+wm7XHA==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "gonzales-pe": "^4.2.3", + "postcss": "^7.0.1" } }, "postcss-scss": { @@ -17424,25 +18099,6 @@ "dev": true, "requires": { "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.2.tgz", - "integrity": "sha512-fmaUY5370keLUTx+CnwRxtGiuFTcNBLQBqr1oE3WZ/euIYmGAo0OAgOhVJ3ByDnVmOR3PK+0V9VebzfjRIUcqw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "postcss-selector-parser": { @@ -17456,12 +18112,6 @@ "uniq": "^1.0.1" } }, - "postcss-styled": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/postcss-styled/-/postcss-styled-0.33.0.tgz", - "integrity": "sha512-ybKIBKYY6q0hADQUECW2F4fDybDFIiAfpMf06/2maxU0yp0FvMTeABrDjzSmKu+99Nj2Gsxe80Xn56FbhzIZZQ==", - "dev": true - }, "postcss-svgo": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.0.tgz", @@ -17472,12 +18122,31 @@ "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0", "svgo": "^1.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-syntax": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.33.0.tgz", - "integrity": "sha512-A9ABlaRy7KWUfG5E39GVTUoc5TXNuNTts5GzwDLwnSaVG151CSLCTcr51/m8cHi4KXcYa+5ImLyeSfBOhEYtGw==", + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", + "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==", "dev": true }, "postcss-unique-selectors": { @@ -17489,6 +18158,25 @@ "alphanum-sort": "^1.0.0", "postcss": "^6.0.0", "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-value-parser": { @@ -18556,20 +19244,20 @@ } }, "remark": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/remark/-/remark-9.0.0.tgz", - "integrity": "sha512-amw8rGdD5lHbMEakiEsllmkdBP+/KpjW/PRK6NSGPZKCQowh0BT4IWXDAkRMyG3SB9dKPXWMviFjNusXzXNn3A==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/remark/-/remark-10.0.1.tgz", + "integrity": "sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==", "dev": true, "requires": { - "remark-parse": "^5.0.0", - "remark-stringify": "^5.0.0", - "unified": "^6.0.0" + "remark-parse": "^6.0.0", + "remark-stringify": "^6.0.0", + "unified": "^7.0.0" } }, "remark-parse": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-5.0.0.tgz", - "integrity": "sha512-b3iXszZLH1TLoyUzrATcTQUZrwNl1rE70rVdSruJFlDaJ9z5aMkhrG43Pp68OgfHndL/ADz6V69Zow8cTQu+JA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz", + "integrity": "sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==", "dev": true, "requires": { "collapse-white-space": "^1.0.2", @@ -18590,9 +19278,9 @@ } }, "remark-stringify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-5.0.0.tgz", - "integrity": "sha512-Ws5MdA69ftqQ/yhRF9XhVV29mhxbfGhbz0Rx5bQH+oJcNhhSM6nCu1EpLod+DjrFGrU0BMPs+czVmJZU7xiS7w==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz", + "integrity": "sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==", "dev": true, "requires": { "ccount": "^1.0.0", @@ -18902,6 +19590,25 @@ "mkdirp": "^0.5.1", "postcss": "^6.0.14", "strip-json-comments": "^2.0.0" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "run-async": { @@ -19761,9 +20468,9 @@ "dev": true }, "specificity": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.0.tgz", - "integrity": "sha512-nGUlURFuoSsmJQ2TBKaO2l7+dBHtRnofSSQdiFKEpd+HBDWXR9/+gtJfgNpe3Nh6o5mqSxDpin/M4YoN7AijGg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", + "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", "dev": true }, "split": { @@ -20106,17 +20813,17 @@ "browserslist": "^4.0.0", "postcss": "^6.0.0", "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "browserslist": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.1.tgz", - "integrity": "sha512-QqiiIWchEIkney3wY53/huI7ZErouNAdvOkjorUALAwRcu3tEwOV3Sh6He0DnP38mz1JjBpCBb50jQBmaYuHPw==", + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000865", - "electron-to-chromium": "^1.3.52", - "node-releases": "^1.0.0-alpha.10" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" } }, "postcss-selector-parser": { @@ -20129,141 +20836,138 @@ "indexes-of": "^1.0.1", "uniq": "^1.0.1" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, "stylelint": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.5.0.tgz", - "integrity": "sha512-63R/DGDjMekFwS4xaHSLy26N19pT1Jsxj7u5QNcJrUWBvvPoBCYx3ObINRgsvNMoupzhV7N0PjylxrDHyh4cKQ==", + "version": "9.10.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz", + "integrity": "sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==", "dev": true, "requires": { "autoprefixer": "^9.0.0", "balanced-match": "^1.0.0", "chalk": "^2.4.1", "cosmiconfig": "^5.0.0", - "debug": "^3.0.0", + "debug": "^4.0.0", "execall": "^1.0.0", - "file-entry-cache": "^2.0.0", + "file-entry-cache": "^4.0.0", "get-stdin": "^6.0.0", - "globby": "^8.0.0", + "global-modules": "^2.0.0", + "globby": "^9.0.0", "globjoin": "^0.1.4", "html-tags": "^2.0.0", - "ignore": "^4.0.0", + "ignore": "^5.0.4", "import-lazy": "^3.1.0", "imurmurhash": "^0.1.4", - "known-css-properties": "^0.6.0", + "known-css-properties": "^0.11.0", + "leven": "^2.1.0", "lodash": "^4.17.4", "log-symbols": "^2.0.0", "mathml-tag-names": "^2.0.1", "meow": "^5.0.0", - "micromatch": "^2.3.11", + "micromatch": "^3.1.10", "normalize-selector": "^0.2.0", "pify": "^4.0.0", - "postcss": "^7.0.0", - "postcss-html": "^0.33.0", - "postcss-jsx": "^0.33.0", - "postcss-less": "^2.0.0", - "postcss-markdown": "^0.33.0", + "postcss": "^7.0.13", + "postcss-html": "^0.36.0", + "postcss-jsx": "^0.36.0", + "postcss-less": "^3.1.0", + "postcss-markdown": "^0.36.0", "postcss-media-query-parser": "^0.2.3", - "postcss-reporter": "^5.0.0", + "postcss-reporter": "^6.0.0", "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^4.0.0", - "postcss-sass": "^0.3.0", + "postcss-sass": "^0.3.5", "postcss-scss": "^2.0.0", "postcss-selector-parser": "^3.1.0", - "postcss-styled": "^0.33.0", - "postcss-syntax": "^0.33.0", + "postcss-syntax": "^0.36.2", "postcss-value-parser": "^3.3.0", "resolve-from": "^4.0.0", "signal-exit": "^3.0.2", - "specificity": "^0.4.0", - "string-width": "^2.1.0", + "slash": "^2.0.0", + "specificity": "^0.4.1", + "string-width": "^3.0.0", "style-search": "^0.1.0", "sugarss": "^2.0.0", "svg-tags": "^1.0.0", - "table": "^4.0.1" + "table": "^5.0.0" }, "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "ansi-regex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", "dev": true }, - "autoprefixer": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.1.1.tgz", - "integrity": "sha512-Q/2zhVEglXXCBNCOFfnihQcQystPYJt4GrIopeWhPjFxRPXya8eOstB89AafW0nWhSscByp+rSXp9EE5X4zgXQ==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "browserslist": "^4.0.2", - "caniuse-lite": "^1.0.30000876", - "normalize-range": "^0.1.2", - "num2fraction": "^1.2.2", - "postcss": "^7.0.2", - "postcss-value-parser": "^3.2.3" + "ms": "^2.1.1" } }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "path-type": "^3.0.0" } }, - "browserslist": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.2.tgz", - "integrity": "sha512-lpujC4zv1trcKUUwfD4pFVNga4YSpB3sLB+/I+A8gvGQxno1c0dMB2aCQy0FE5oUNIDjD9puFiFF0zeS6Ji48w==", + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "fast-glob": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.6.tgz", + "integrity": "sha512-0BvMaZc1k9F+MeWWMe8pL6YltFzZYcJsYU7D4JyDA6PAczaXvxqQQ/z+mDF7/4Mw01DeUc+i3CTKajnkANkV4w==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000876", - "electron-to-chromium": "^1.3.57", - "node-releases": "^1.0.0-alpha.11" + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" } }, - "caniuse-lite": { - "version": "1.0.30000877", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000877.tgz", - "integrity": "sha512-h04kV/lcuhItU1CZTJOxUEk/9R+1XeJqgc67E+XC8J9TjPM8kzVgOn27ZtRdDUo8O5F8U4QRCzDWJrVym3w3Cg==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.58", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.58.tgz", - "integrity": "sha512-AGJxlBEn2wOohxqWZkISVsOjZueKTQljfEODTDSEiMqSpH0S+xzV+/5oEM9AGaqhu7DzrpKOgU7ocQRjj0nJmg==", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "file-entry-cache": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz", + "integrity": "sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "flat-cache": "^2.0.1" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" } }, "get-stdin": { @@ -20272,97 +20976,123 @@ "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", "dev": true }, - "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" }, "dependencies": { - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } } } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "global-prefix": "^3.0.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" } }, - "node-releases": { - "version": "1.0.0-alpha.11", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.0-alpha.11.tgz", - "integrity": "sha512-CaViu+2FqTNYOYNihXa5uPS/zry92I3vPU4nCB6JB3OeZ2UGtOpF5gRwuN4+m3hbEcL47bOXyun1jX2iC+3uEQ==", - "dev": true, - "requires": { - "semver": "^5.3.0" + "globby": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.0.0.tgz", + "integrity": "sha512-q0qiO/p1w/yJ0hk8V9x1UXlgsXUxlGd0AHUOXZVXBO6aznDtpx7M8D1kBrCAItoPm+4l8r6ATXV1JpjY2SBQOw==", + "dev": true, + "requires": { + "array-union": "^1.0.2", + "dir-glob": "^2.2.1", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "dependencies": { + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + } } }, - "pify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.0.tgz", - "integrity": "sha512-zrSP/KDf9DH3K3VePONoCstgPiYJy9z0SCatZuTpOc7YdnWIqwkWdXOuwlr4uDc7em8QZRsFWsT/685x5InjYg==", + "ignore": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.0.4.tgz", + "integrity": "sha512-WLsTMEhsQuXpCiG173+f3aymI43SXa+fB1rSfbzyP4GkPP+ZFVuO0/3sFUGNBtifisPeDcl/uD/Y2NxZ7xFq4g==", "dev": true }, - "postcss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.2.tgz", - "integrity": "sha512-fmaUY5370keLUTx+CnwRxtGiuFTcNBLQBqr1oE3WZ/euIYmGAo0OAgOhVJ3ByDnVmOR3PK+0V9VebzfjRIUcqw==", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "is-extglob": "^2.1.1" } }, + "merge2": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "postcss-selector-parser": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", @@ -20380,11 +21110,49 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true + }, + "string-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.0.0.tgz", + "integrity": "sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.0.0" + } + }, + "strip-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "dev": true, + "requires": { + "ansi-regex": "^4.0.0" + } + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } }, @@ -20447,25 +21215,6 @@ "dev": true, "requires": { "postcss": "^7.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.2.tgz", - "integrity": "sha512-fmaUY5370keLUTx+CnwRxtGiuFTcNBLQBqr1oE3WZ/euIYmGAo0OAgOhVJ3ByDnVmOR3PK+0V9VebzfjRIUcqw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "source-map": "^0.6.1", - "supports-color": "^5.4.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } }, "supports-color": { @@ -20553,29 +21302,27 @@ "dev": true }, "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.1.tgz", + "integrity": "sha512-qmhNs2GEHNqY5fd2Mo+8N1r2sw/rvTAAvBZTaTx+Y7PHLypqyrxr1MdIu0pLw6Xvl/Gi4ONu/sdceP8vvUjkyA==", "dev": true, "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", + "ajv": "^6.6.1", + "lodash": "^4.17.11", + "slice-ansi": "2.0.0", "string-width": "^2.1.1" }, "dependencies": { "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz", + "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "uri-js": "^4.2.2" } }, "fast-deep-equal": { @@ -20589,6 +21336,23 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "slice-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz", + "integrity": "sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } } } }, @@ -21153,16 +21917,18 @@ "dev": true }, "unified": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/unified/-/unified-6.2.0.tgz", - "integrity": "sha512-1k+KPhlVtqmG99RaTbAv/usu85fcSRu3wY8X+vnsEhIxNP5VbVIDiXnLqyKIG+UMdyTg0ZX9EI6k2AfjJkHPtA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz", + "integrity": "sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==", "dev": true, "requires": { + "@types/unist": "^2.0.0", + "@types/vfile": "^3.0.0", "bail": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^1.1.0", "trough": "^1.0.0", - "vfile": "^2.0.0", + "vfile": "^3.0.0", "x-is-string": "^0.1.0" } }, @@ -21501,17 +22267,23 @@ } }, "vfile": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz", - "integrity": "sha512-ASt4mBUHcTpMKD/l5Q+WJXNtshlWxOogYyGYYrg4lt/vuRjC1EFQtlAofL5VmtVNIZJzWYFJjzGWZ0Gw8pzW1w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz", + "integrity": "sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==", "dev": true, "requires": { - "is-buffer": "^1.1.4", + "is-buffer": "^2.0.0", "replace-ext": "1.0.0", "unist-util-stringify-position": "^1.0.0", "vfile-message": "^1.0.0" }, "dependencies": { + "is-buffer": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "dev": true + }, "replace-ext": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", diff --git a/package.json b/package.json index a50ef6c984a703..ccfebf409fcd26 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "@wordpress/scripts": "file:packages/scripts", "babel-loader": "8.0.0", "benchmark": "2.1.4", - "browserslist": "3.2.8", + "browserslist": "4.4.1", "chalk": "2.4.1", "concurrently": "3.5.0", "copy-webpack-plugin": "4.5.2", diff --git a/packages/postcss-themes/package.json b/packages/postcss-themes/package.json index 30b5a6b85572fe..ced2f27afbd11a 100644 --- a/packages/postcss-themes/package.json +++ b/packages/postcss-themes/package.json @@ -27,8 +27,8 @@ "main": "build/index.js", "dependencies": { "@babel/runtime": "^7.0.0", - "autoprefixer": "^8.2.0", - "postcss": "^6.0.16", + "autoprefixer": "^9.4.5", + "postcss": "^7.0.13", "postcss-color-function": "^4.0.1" }, "publishConfig": { diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 4c6b0b918b8ad6..31441fc5fdd49c 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -45,7 +45,7 @@ "puppeteer": "1.6.1", "read-pkg-up": "^1.0.1", "resolve-bin": "^0.4.0", - "stylelint": "^9.5.0", + "stylelint": "^9.10.1", "stylelint-config-wordpress": "^13.1.0" }, "publishConfig": { From 44409fb31f2ad9b6b745d2766269381976502227 Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Mon, 21 Jan 2019 04:35:22 -0500 Subject: [PATCH 16/56] Block Serialization Default Parser: Use PCRE v6.x subpattern syntax (#13369) --- packages/block-serialization-default-parser/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-serialization-default-parser/parser.php b/packages/block-serialization-default-parser/parser.php index 8b565f1a28b9be..eb4c21a973c0f2 100644 --- a/packages/block-serialization-default-parser/parser.php +++ b/packages/block-serialization-default-parser/parser.php @@ -410,7 +410,7 @@ function next_token() { * match back in PHP to see which one it was. */ $has_match = preg_match( - '/<!--\s+(?<closer>\/)?wp:(?<namespace>[a-z][a-z0-9_-]*\/)?(?<name>[a-z][a-z0-9_-]*)\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*+)?}\s+)?(?<void>\/)?-->/s', + '/<!--\s+(?P<closer>\/)?wp:(?P<namespace>[a-z][a-z0-9_-]*\/)?(?P<name>[a-z][a-z0-9_-]*)\s+(?P<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*+)?}\s+)?(?P<void>\/)?-->/s', $this->document, $matches, PREG_OFFSET_CAPTURE, From e1e02af4f87bf988a1df3f24e58f9059298cf50a Mon Sep 17 00:00:00 2001 From: William Earnhardt <wearnhardt@gmail.com> Date: Mon, 21 Jan 2019 05:00:21 -0500 Subject: [PATCH 17/56] Add test case for pending to isEditedPostDateFloating suite (#13256) (#13281) This is just a follow up for #13256. It was opened against the `fix/13176-post-date-pending` branch instead of `master`. It should have been merged there first prior to #13178 getting merged. This just brings that test over to `master`. --- packages/editor/src/store/test/selectors.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/editor/src/store/test/selectors.js b/packages/editor/src/store/test/selectors.js index 6e8f963129dc70..d75c81edbb909f 100644 --- a/packages/editor/src/store/test/selectors.js +++ b/packages/editor/src/store/test/selectors.js @@ -1940,6 +1940,24 @@ describe( 'selectors', () => { expect( isEditedPostDateFloating( state ) ).toBe( false ); } ); + + it( 'should return true for pending posts', () => { + const state = { + currentPost: { + date: '2018-09-27T01:23:45.678Z', + modified: '2018-09-27T01:23:45.678Z', + status: 'pending', + }, + editor: { + present: { + edits: {}, + }, + }, + initialEdits: {}, + }; + + expect( isEditedPostDateFloating( state ) ).toBe( true ); + } ); } ); describe( 'getBlockDependantsCacheBust', () => { From 6d5a5374a0d2c42e18f113a5c056d4cfa1481290 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak <marcus@mkaz.com> Date: Mon, 21 Jan 2019 06:54:38 -0800 Subject: [PATCH 18/56] Add example usage for MediaPlaceholder (#13389) * Add example usage for MediaPlaceholder Adds an example of how to use the MediaPlaceholder and setting the url for an image attribute. Fixes #13377 * Fixed code style --- .../components/media-placeholder/README.md | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/packages/editor/src/components/media-placeholder/README.md b/packages/editor/src/components/media-placeholder/README.md index d9d2483a7c71d6..2890d2f1f162a1 100644 --- a/packages/editor/src/components/media-placeholder/README.md +++ b/packages/editor/src/components/media-placeholder/README.md @@ -3,7 +3,31 @@ MediaPlaceholder `MediaPlaceholder` is a React component used to render either the media associated with a block, or an editing interface to replace the media for a block. -## Setup +## Usage + +An example usage which sets the URL of the selected image to `theImage` attributes. + +``` +const { MediaPlaceholder } = wp.editor; + +... + + edit: ( { attributes, setAttributes } ) { + const mediaPlaceholder = <MediaPlaceholder + onSelect = { + ( el ) => { + setAttributes( { theImage: el.url } ); + } + } + allowedTypes = { [ 'image' ] } + multiple = { false } + labels = { { title: 'The Image' } } + />; + ... + } +``` + +## Extend It includes a `wp.hooks` filter `editor.MediaPlaceholder` that enables developers to replace or extend it. @@ -12,18 +36,18 @@ _Example:_ Replace implementation of the placeholder: ```js -function replaceMediaPlaceholder() { - return function() { - return wp.element.createElement( - 'div', - {}, - 'The replacement contents or components.' - ); - } -} - -wp.hooks.addFilter( - 'editor.MediaPlaceholder', +function replaceMediaPlaceholder() { + return function() { + return wp.element.createElement( + 'div', + {}, + 'The replacement contents or components.' + ); + } +} + +wp.hooks.addFilter( + 'editor.MediaPlaceholder', 'my-plugin/replace-media-placeholder', replaceMediaPlaceholder ); From 705e57eccb1bdcef076cc4505dff19eb47229834 Mon Sep 17 00:00:00 2001 From: Luke Pettway <luke.pettway@gmail.com> Date: Mon, 21 Jan 2019 23:39:11 -0500 Subject: [PATCH 19/56] Fix date picker 24hour tab order (#11863) * removed is24hour class, move markup for month and day to render methods and use some logic to determine logical order * update snapshots to test the is12Hour boolean. --- packages/components/src/date-time/style.scss | 6 - .../date-time/test/__snapshots__/time.js.snap | 689 ++++++++++++++++++ .../components/src/date-time/test/time.js | 26 +- packages/components/src/date-time/time.js | 96 ++- 4 files changed, 761 insertions(+), 56 deletions(-) create mode 100644 packages/components/src/date-time/test/__snapshots__/time.js.snap diff --git a/packages/components/src/date-time/style.scss b/packages/components/src/date-time/style.scss index 530b397c9144ec..9412de832e3ea6 100644 --- a/packages/components/src/date-time/style.scss +++ b/packages/components/src/date-time/style.scss @@ -152,12 +152,6 @@ border-radius: 0 $radius-round-rectangle $radius-round-rectangle 0 !important; } } - - &.is-24-hour { - .components-datetime__time-field-day { - order: 0 !important; - } - } } .components-datetime__time-legend { diff --git a/packages/components/src/date-time/test/__snapshots__/time.js.snap b/packages/components/src/date-time/test/__snapshots__/time.js.snap new file mode 100644 index 00000000000000..d67e11da54846e --- /dev/null +++ b/packages/components/src/date-time/test/__snapshots__/time.js.snap @@ -0,0 +1,689 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TimePicker matches the snapshot when the is12hour prop is false 1`] = ` +<div + className="components-datetime__time" +> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Date + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-month" + key="render-month" + > + <select + aria-label="Month" + className="components-datetime__time-field-month-select" + onBlur={[Function]} + onChange={[Function]} + value="10" + > + <option + value="01" + > + January + </option> + <option + value="02" + > + February + </option> + <option + value="03" + > + March + </option> + <option + value="04" + > + April + </option> + <option + value="05" + > + May + </option> + <option + value="06" + > + June + </option> + <option + value="07" + > + July + </option> + <option + value="08" + > + August + </option> + <option + value="09" + > + September + </option> + <option + value="10" + > + October + </option> + <option + value="11" + > + November + </option> + <option + value="12" + > + December + </option> + </select> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-day" + key="render-day" + > + <input + aria-label="Day" + className="components-datetime__time-field-day-input" + min={1} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="18" + /> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-year" + > + <input + aria-label="Year" + className="components-datetime__time-field-year-input" + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="1986" + /> + </div> + </div> + </fieldset> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Time + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-time" + > + <input + aria-label="Hours" + className="components-datetime__time-field-hours-input" + max={23} + min={0} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="23" + /> + <span + aria-hidden="true" + className="components-datetime__time-separator" + > + : + </span> + <input + aria-label="Minutes" + className="components-datetime__time-field-minutes-input" + max={59} + min={0} + onBlur={[Function]} + onChange={[Function]} + type="number" + value="00" + /> + </div> + </div> + </fieldset> +</div> +`; + +exports[`TimePicker matches the snapshot when the is12hour prop is specified 1`] = ` +<div + className="components-datetime__time" +> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Date + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-day" + key="render-day" + > + <input + aria-label="Day" + className="components-datetime__time-field-day-input" + min={1} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="18" + /> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-month" + key="render-month" + > + <select + aria-label="Month" + className="components-datetime__time-field-month-select" + onBlur={[Function]} + onChange={[Function]} + value="10" + > + <option + value="01" + > + January + </option> + <option + value="02" + > + February + </option> + <option + value="03" + > + March + </option> + <option + value="04" + > + April + </option> + <option + value="05" + > + May + </option> + <option + value="06" + > + June + </option> + <option + value="07" + > + July + </option> + <option + value="08" + > + August + </option> + <option + value="09" + > + September + </option> + <option + value="10" + > + October + </option> + <option + value="11" + > + November + </option> + <option + value="12" + > + December + </option> + </select> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-year" + > + <input + aria-label="Year" + className="components-datetime__time-field-year-input" + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="1986" + /> + </div> + </div> + </fieldset> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Time + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-time" + > + <input + aria-label="Hours" + className="components-datetime__time-field-hours-input" + max={12} + min={1} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="11" + /> + <span + aria-hidden="true" + className="components-datetime__time-separator" + > + : + </span> + <input + aria-label="Minutes" + className="components-datetime__time-field-minutes-input" + max={59} + min={0} + onBlur={[Function]} + onChange={[Function]} + type="number" + value="00" + /> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-am-pm" + > + <ForwardRef(Button) + aria-pressed={false} + className="components-datetime__time-am-button" + isDefault={true} + isToggled={false} + onClick={[Function]} + > + AM + </ForwardRef(Button)> + <ForwardRef(Button) + aria-pressed={true} + className="components-datetime__time-pm-button" + isDefault={true} + isToggled={true} + onClick={[Function]} + > + PM + </ForwardRef(Button)> + </div> + </div> + </fieldset> +</div> +`; + +exports[`TimePicker matches the snapshot when the is12hour prop is true 1`] = ` +<div + className="components-datetime__time" +> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Date + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-day" + key="render-day" + > + <input + aria-label="Day" + className="components-datetime__time-field-day-input" + min={1} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="18" + /> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-month" + key="render-month" + > + <select + aria-label="Month" + className="components-datetime__time-field-month-select" + onBlur={[Function]} + onChange={[Function]} + value="10" + > + <option + value="01" + > + January + </option> + <option + value="02" + > + February + </option> + <option + value="03" + > + March + </option> + <option + value="04" + > + April + </option> + <option + value="05" + > + May + </option> + <option + value="06" + > + June + </option> + <option + value="07" + > + July + </option> + <option + value="08" + > + August + </option> + <option + value="09" + > + September + </option> + <option + value="10" + > + October + </option> + <option + value="11" + > + November + </option> + <option + value="12" + > + December + </option> + </select> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-year" + > + <input + aria-label="Year" + className="components-datetime__time-field-year-input" + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="1986" + /> + </div> + </div> + </fieldset> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Time + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-time" + > + <input + aria-label="Hours" + className="components-datetime__time-field-hours-input" + max={12} + min={1} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="11" + /> + <span + aria-hidden="true" + className="components-datetime__time-separator" + > + : + </span> + <input + aria-label="Minutes" + className="components-datetime__time-field-minutes-input" + max={59} + min={0} + onBlur={[Function]} + onChange={[Function]} + type="number" + value="00" + /> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-am-pm" + > + <ForwardRef(Button) + aria-pressed={false} + className="components-datetime__time-am-button" + isDefault={true} + isToggled={false} + onClick={[Function]} + > + AM + </ForwardRef(Button)> + <ForwardRef(Button) + aria-pressed={true} + className="components-datetime__time-pm-button" + isDefault={true} + isToggled={true} + onClick={[Function]} + > + PM + </ForwardRef(Button)> + </div> + </div> + </fieldset> +</div> +`; + +exports[`TimePicker matches the snapshot when the is12hour prop is undefined 1`] = ` +<div + className="components-datetime__time" +> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Date + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-month" + key="render-month" + > + <select + aria-label="Month" + className="components-datetime__time-field-month-select" + onBlur={[Function]} + onChange={[Function]} + value="10" + > + <option + value="01" + > + January + </option> + <option + value="02" + > + February + </option> + <option + value="03" + > + March + </option> + <option + value="04" + > + April + </option> + <option + value="05" + > + May + </option> + <option + value="06" + > + June + </option> + <option + value="07" + > + July + </option> + <option + value="08" + > + August + </option> + <option + value="09" + > + September + </option> + <option + value="10" + > + October + </option> + <option + value="11" + > + November + </option> + <option + value="12" + > + December + </option> + </select> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-day" + key="render-day" + > + <input + aria-label="Day" + className="components-datetime__time-field-day-input" + min={1} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="18" + /> + </div> + <div + className="components-datetime__time-field components-datetime__time-field-year" + > + <input + aria-label="Year" + className="components-datetime__time-field-year-input" + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="1986" + /> + </div> + </div> + </fieldset> + <fieldset> + <legend + className="components-datetime__time-legend invisible" + > + Time + </legend> + <div + className="components-datetime__time-wrapper" + > + <div + className="components-datetime__time-field components-datetime__time-field-time" + > + <input + aria-label="Hours" + className="components-datetime__time-field-hours-input" + max={23} + min={0} + onBlur={[Function]} + onChange={[Function]} + step={1} + type="number" + value="23" + /> + <span + aria-hidden="true" + className="components-datetime__time-separator" + > + : + </span> + <input + aria-label="Minutes" + className="components-datetime__time-field-minutes-input" + max={59} + min={0} + onBlur={[Function]} + onChange={[Function]} + type="number" + value="00" + /> + </div> + </div> + </fieldset> +</div> +`; diff --git a/packages/components/src/date-time/test/time.js b/packages/components/src/date-time/test/time.js index 64c868ea293aa1..3d61d058f330ce 100644 --- a/packages/components/src/date-time/test/time.js +++ b/packages/components/src/date-time/test/time.js @@ -9,18 +9,24 @@ import { shallow } from 'enzyme'; import TimePicker from '../time'; describe( 'TimePicker', () => { - it( 'should have the correct CSS class if 12-hour clock is specified', () => { - const onChangeSpy = jest.fn(); - const picker = shallow( <TimePicker currentTime="1986-10-18T11:00:00" onChange={ onChangeSpy } is12Hour={ true } /> ); - expect( picker.hasClass( 'is-12-hour' ) ).toBe( true ); + it( 'matches the snapshot when the is12hour prop is true', () => { + const wrapper = shallow( <TimePicker currentTime="1986-10-18T23:00:00" is12Hour={ true } /> ); + expect( wrapper ).toMatchSnapshot(); } ); - it( 'should have the correct CSS class if 24-hour clock is specified', () => { - const onChangeSpy = jest.fn(); - const picker = shallow( - <TimePicker currentTime="1986-10-18T11:00:00" onChange={ onChangeSpy } is12Hour={ false } /> - ); - expect( picker.hasClass( 'is-24-hour' ) ).toBe( true ); + it( 'matches the snapshot when the is12hour prop is false', () => { + const wrapper = shallow( <TimePicker currentTime="1986-10-18T23:00:00" is12Hour={ false } /> ); + expect( wrapper ).toMatchSnapshot(); + } ); + + it( 'matches the snapshot when the is12hour prop is specified', () => { + const wrapper = shallow( <TimePicker currentTime="1986-10-18T23:00:00" is12Hour /> ); + expect( wrapper ).toMatchSnapshot(); + } ); + + it( 'matches the snapshot when the is12hour prop is undefined', () => { + const wrapper = shallow( <TimePicker currentTime="1986-10-18T23:00:00" /> ); + expect( wrapper ).toMatchSnapshot(); } ); it( 'should call onChange with an updated day', () => { diff --git a/packages/components/src/date-time/time.js b/packages/components/src/date-time/time.js index 1db16f6b362d2a..8cb80cdee21674 100644 --- a/packages/components/src/date-time/time.js +++ b/packages/components/src/date-time/time.js @@ -43,6 +43,9 @@ class TimePicker extends Component { this.updateMinutes = this.updateMinutes.bind( this ); this.onChangeHours = this.onChangeHours.bind( this ); this.onChangeMinutes = this.onChangeMinutes.bind( this ); + this.renderMonth = this.renderMonth.bind( this ); + this.renderDay = this.renderDay.bind( this ); + this.renderDayMonthFormat = this.renderDayMonthFormat.bind( this ); } componentDidMount() { @@ -189,52 +192,65 @@ class TimePicker extends Component { this.setState( { minutes: event.target.value } ); } + renderMonth( month ) { + return ( + <div key="render-month" className="components-datetime__time-field components-datetime__time-field-month"> + <select + aria-label={ __( 'Month' ) } + className="components-datetime__time-field-month-select" + value={ month } + onChange={ this.onChangeMonth } + onBlur={ this.updateMonth } + > + <option value="01">{ __( 'January' ) }</option> + <option value="02">{ __( 'February' ) }</option> + <option value="03">{ __( 'March' ) }</option> + <option value="04">{ __( 'April' ) }</option> + <option value="05">{ __( 'May' ) }</option> + <option value="06">{ __( 'June' ) }</option> + <option value="07">{ __( 'July' ) }</option> + <option value="08">{ __( 'August' ) }</option> + <option value="09">{ __( 'September' ) }</option> + <option value="10">{ __( 'October' ) }</option> + <option value="11">{ __( 'November' ) }</option> + <option value="12">{ __( 'December' ) }</option> + </select> + </div> + ); + } + + renderDay( day ) { + return ( + <div key="render-day" className="components-datetime__time-field components-datetime__time-field-day"> + <input + aria-label={ __( 'Day' ) } + className="components-datetime__time-field-day-input" + type="number" + value={ day } + step={ 1 } + min={ 1 } + onChange={ this.onChangeDay } + onBlur={ this.updateDay } + /> + </div> + ); + } + + renderDayMonthFormat( is12Hour ) { + const { day, month } = this.state; + const layout = [ this.renderDay( day ), this.renderMonth( month ) ]; + return is12Hour ? layout : layout.reverse(); + } + render() { const { is12Hour } = this.props; - const { day, month, year, minutes, hours, am } = this.state; - + const { year, minutes, hours, am } = this.state; return ( - <div className={ classnames( 'components-datetime__time', { - 'is-12-hour': is12Hour, - 'is-24-hour': ! is12Hour, - } ) }> + <div className={ classnames( 'components-datetime__time' ) }> <fieldset> <legend className="components-datetime__time-legend invisible">{ __( 'Date' ) }</legend> <div className="components-datetime__time-wrapper"> - <div className="components-datetime__time-field components-datetime__time-field-month"> - <select - aria-label={ __( 'Month' ) } - className="components-datetime__time-field-month-select" - value={ month } - onChange={ this.onChangeMonth } - onBlur={ this.updateMonth } - > - <option value="01">{ __( 'January' ) }</option> - <option value="02">{ __( 'February' ) }</option> - <option value="03">{ __( 'March' ) }</option> - <option value="04">{ __( 'April' ) }</option> - <option value="05">{ __( 'May' ) }</option> - <option value="06">{ __( 'June' ) }</option> - <option value="07">{ __( 'July' ) }</option> - <option value="08">{ __( 'August' ) }</option> - <option value="09">{ __( 'September' ) }</option> - <option value="10">{ __( 'October' ) }</option> - <option value="11">{ __( 'November' ) }</option> - <option value="12">{ __( 'December' ) }</option> - </select> - </div> - <div className="components-datetime__time-field components-datetime__time-field-day"> - <input - aria-label={ __( 'Day' ) } - className="components-datetime__time-field-day-input" - type="number" - value={ day } - step={ 1 } - min={ 1 } - onChange={ this.onChangeDay } - onBlur={ this.updateDay } - /> - </div> + { this.renderDayMonthFormat( is12Hour ) } <div className="components-datetime__time-field components-datetime__time-field-year"> <input aria-label={ __( 'Year' ) } From 0bf39b48fe339ddfdd2340ecf3b5fd181d187719 Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Tue, 22 Jan 2019 03:31:26 -0500 Subject: [PATCH 20/56] Docs: Fix Notices documentation data handbook reference (#13409) * Docs: Fix Notices documentation data handbook reference * Update link --- packages/notices/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/notices/README.md b/packages/notices/README.md index a32e69725b39c9..eeeba5f63d6ae9 100644 --- a/packages/notices/README.md +++ b/packages/notices/README.md @@ -20,6 +20,6 @@ When imported, the notices module registers a data store on the `core/notices` n For more information about consuming from a data store, refer to [the `@wordpress/data` documentation on _Data Access and Manipulation_](/packages/data/README.md#data-access-and-manipulation). -For a full list of actions and selectors available in the `core/notices` namespace, refer to the [_Notices Data_ Handbook page](https://wordpress.org/gutenberg/handbook/packages/packages-data/packages-data-core-edit-post/). +For a full list of actions and selectors available in the `core/notices` namespace, refer to the [_Notices Data_ Handbook page](/docs/designers-developers/developers/data/data-core-notices.md). <br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p> From bd0f6853ae77fd8d524f66a6b545887f3dd56a03 Mon Sep 17 00:00:00 2001 From: Mikael Korpela <mikael@ihminen.org> Date: Tue, 22 Jan 2019 10:43:18 +0200 Subject: [PATCH 21/56] Docs: mention dark colour scheme in design docs (#13375) * Docs: mention dark colour scheme in design docs * Update link --- docs/designers-developers/designers/block-design.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/designers-developers/designers/block-design.md b/docs/designers-developers/designers/block-design.md index 64eb736142c9d5..3840c863dd4875 100644 --- a/docs/designers-developers/designers/block-design.md +++ b/docs/designers-developers/designers/block-design.md @@ -116,6 +116,10 @@ Because the Drop Cap feature is not necessary for the basic operation of the blo Check how your block looks, feels, and works on as many devices and screen sizes as you can. +### Support Gutenberg's dark background editor scheme + +Check how your block looks with [dark backgrounds](/docs/designers-developers/developers/themes/theme-support.md#dark-backgrounds) in the editor. + ## Examples To demonstrate some of these practices, here are a few annotated examples of default Gutenberg blocks: From 8fdf3cd53773d43661a25ea8e96a91198e41ec9b Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak <marcus@mkaz.com> Date: Tue, 22 Jan 2019 00:49:50 -0800 Subject: [PATCH 22/56] Update meta box link to new tutorial (#13302) * Update meta box link to new tutorial * Update README.md Fix link. Simplify URLs. * Update with both links for working with meta data * Fixed links --- docs/designers-developers/developers/README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/designers-developers/developers/README.md b/docs/designers-developers/developers/README.md index 860e6f3b07310a..162c45fbcfa4eb 100644 --- a/docs/designers-developers/developers/README.md +++ b/docs/designers-developers/developers/README.md @@ -6,40 +6,40 @@ The new editor is highly flexible, like most of WordPress. You can build custom The editor is about blocks, and the main extensibility API is the Block API. It allows you to create your own static blocks, dynamic blocks rendered on the server and also blocks capable of saving data to Post Meta for more structured content. -If you want to learn more about block creation, the [Blocks Tutorial](../../../docs/designers-developers/developers/tutorials/block-tutorial/readme.md) is the best place to start. +If you want to learn more about block creation, the [Blocks Tutorial](/docs/designers-developers/developers/tutorials/block-tutorial/readme.md) is the best place to start. ## Extending Blocks It is also possible to modify the behavior of existing blocks or even remove them completely using filters. -Learn more in the [Block Filters](../../../docs/designers-developers/developers/reference/hooks/block-filters.md) section. +Learn more in the [Block Filters](/docs/designers-developers/developers/filters/block-filters.md) section. ## Extending the Editor UI Extending the editor UI can be accomplished with the `registerPlugin` API, allowing you to define all your plugin's UI elements in one place. -Refer to the [Plugins](https://github.com/WordPress/gutenberg/blob/master/packages/plugins/README.md) and [Edit Post](https://github.com/WordPress/gutenberg/blob/master/packages/edit-post/README.md) section for more information. +Refer to the [Plugins](/packages/plugins/README.md) and [Edit Post](/packages/edit-post/README.md) section for more information. -You can also filter certain aspects of the editor; this is documented on the [Editor Filters](../../../docs/designers-developers/developers/reference/hooks/editor-filters.md) page. +You can also filter certain aspects of the editor; this is documented on the [Editor Filters](/docs/designers-developers/developers/filters/editor-filters.md) page. ## Meta Boxes -**Porting PHP meta boxes to blocks or sidebar plugins is highly encouraged!** +Porting PHP meta boxes to blocks or sidebar plugins is highly encouraged, learn how through these [meta data tutorials](/docs/designers-developers/developers/tutorials/metabox/readme.md). -Discover how [Meta Box](../../../docs/designers-developers/developers/backward-compatibility/meta-box.md) support works in the new editor. +See how the new editor [supports existing Meta Boxes](/docs/designers-developers/developers/backward-compatibility/meta-box.md). ## Theme Support By default, blocks provide their styles to enable basic support for blocks in themes without any change. Themes can add/override these styles, or rely on defaults. -There are some advanced block features which require opt-in support in the theme. See [theme support](../../../docs/designers-developers/developers/themes/theme-support.md). +There are some advanced block features which require opt-in support in the theme. See [theme support](/docs/designers-developers/developers/themes/theme-support.md). ## Autocomplete -Autocompleters within blocks may be extended and overridden. Learn more about the [autocomplete](../../../docs/designers-developers/developers/filters/autocomplete-filters.md) filters. +Autocompleters within blocks may be extended and overridden. Learn more about the [autocomplete](/docs/designers-developers/developers/filters/autocomplete-filters.md) filters. ## Block Parsing and Serialization Posts in the editor move through a couple of different stages between being stored in `post_content` and appearing in the editor. Since the blocks themselves are data structures that live in memory it takes a parsing and serialization step to transform out from and into the stored format in the database. -Customizing the parser is an advanced topic that you can learn more about in the [Extending the Parser](../../../docs/designers-developers/developers/filters/parser-filters.md) section. +Customizing the parser is an advanced topic that you can learn more about in the [Extending the Parser](/docs/designers-developers/developers/filters/parser-filters.md) section. From 21651474f7f6793be730af9adaaa1be28a7a2911 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak <marcus@mkaz.com> Date: Tue, 22 Jan 2019 00:51:38 -0800 Subject: [PATCH 23/56] Update docs for unregisterBlockType (#13273) --- .../developers/filters/block-filters.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/designers-developers/developers/filters/block-filters.md b/docs/designers-developers/developers/filters/block-filters.md index 4f28cf17a9f18f..cc4f71bb95540e 100644 --- a/docs/designers-developers/developers/filters/block-filters.md +++ b/docs/designers-developers/developers/filters/block-filters.md @@ -261,8 +261,9 @@ Adding blocks is easy enough, removing them is as easy. Plugin or theme authors ```js // my-plugin.js - -wp.blocks.unregisterBlockType( 'core/verse' ); +wp.domReady( function() { + wp.blocks.unregisterBlockType( 'core/verse' ); +} ); ``` and load this script in the Editor @@ -275,7 +276,7 @@ function my_plugin_blacklist_blocks() { wp_enqueue_script( 'my-plugin-blacklist-blocks', plugins_url( 'my-plugin.js', __FILE__ ), - array( 'wp-blocks' ) + array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ) ); } add_action( 'enqueue_block_editor_assets', 'my_plugin_blacklist_blocks' ); From 15fc0c13eb33a6e4426ff4ad681b6bfb6d0adaec Mon Sep 17 00:00:00 2001 From: Hiroshi Urabe <mail@torounit.com> Date: Tue, 22 Jan 2019 21:27:02 +0900 Subject: [PATCH 24/56] <CategorySelect> support post_tags and hierarchical = false taxonomy. (#13076) --- .../components/src/query-controls/terms.js | 13 +++- .../src/query-controls/test/terms.js | 61 +++++++++++++++++++ packages/editor/src/utils/terms.js | 13 +++- packages/editor/src/utils/test/terms.js | 13 +++- 4 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 packages/components/src/query-controls/test/terms.js diff --git a/packages/components/src/query-controls/terms.js b/packages/components/src/query-controls/terms.js index cbeb9d0bb4b7ae..ba76e68980184e 100644 --- a/packages/components/src/query-controls/terms.js +++ b/packages/components/src/query-controls/terms.js @@ -11,7 +11,18 @@ import { groupBy } from 'lodash'; * @return {Array} Array of terms in tree format. */ export function buildTermsTree( flatTerms ) { - const termsByParent = groupBy( flatTerms, 'parent' ); + const flatTermsWithParentAndChildren = flatTerms.map( ( term ) => { + return { + children: [], + parent: null, + ...term, + }; + } ); + + const termsByParent = groupBy( flatTermsWithParentAndChildren, 'parent' ); + if ( termsByParent.null && termsByParent.null.length ) { + return flatTermsWithParentAndChildren; + } const fillWithChildren = ( terms ) => { return terms.map( ( term ) => { const children = termsByParent[ term.id ]; diff --git a/packages/components/src/query-controls/test/terms.js b/packages/components/src/query-controls/test/terms.js new file mode 100644 index 00000000000000..11cf1505d4f27e --- /dev/null +++ b/packages/components/src/query-controls/test/terms.js @@ -0,0 +1,61 @@ +/** + * Internal dependencies + */ +import { buildTermsTree } from '../terms'; + +describe( 'buildTermsTree()', () => { + it( 'Should return same array as input with null parent and empty children added if parent is never specified.', () => { + const input = Object.freeze( [ + { id: 2232, dummy: true }, + { id: 2245, dummy: true }, + ] ); + const output = Object.freeze( [ + { id: 2232, parent: null, children: [], dummy: true }, + { id: 2245, parent: null, children: [], dummy: true }, + ] ); + const termsTreem = buildTermsTree( input ); + expect( termsTreem ).toEqual( output ); + } ); + it( 'Should return same array as input with empty children added if all the elements are top level', () => { + const input = Object.freeze( [ + { id: 2232, parent: 0, dummy: true }, + { id: 2245, parent: 0, dummy: false }, + ] ); + const output = [ + { id: 2232, parent: 0, children: [], dummy: true }, + { id: 2245, parent: 0, children: [], dummy: false }, + ]; + const termsTreem = buildTermsTree( input ); + expect( termsTreem ).toEqual( output ); + } ); + it( 'Should return element with its child if a child exists', () => { + const input = Object.freeze( [ + { id: 2232, parent: 0 }, + { id: 2245, parent: 2232 }, + ] ); + const output = [ + { id: 2232, parent: 0, children: [ + { id: 2245, parent: 2232, children: [] }, + ] }, + ]; + const termsTreem = buildTermsTree( input ); + expect( termsTreem ).toEqual( output ); + } ); + it( 'Should return elements with multiple children and elements with no children', () => { + const input = Object.freeze( [ + { id: 2232, parent: 0 }, + { id: 2245, parent: 2232 }, + { id: 2249, parent: 0 }, + { id: 2246, parent: 2232 }, + ] ); + const output = [ + { id: 2232, parent: 0, children: [ + { id: 2245, parent: 2232, children: [] }, + { id: 2246, parent: 2232, children: [] }, + ] }, + { id: 2249, parent: 0, children: [] }, + ]; + const termsTreem = buildTermsTree( input ); + expect( termsTreem ).toEqual( output ); + } ); +} ); diff --git a/packages/editor/src/utils/terms.js b/packages/editor/src/utils/terms.js index cbeb9d0bb4b7ae..ba76e68980184e 100644 --- a/packages/editor/src/utils/terms.js +++ b/packages/editor/src/utils/terms.js @@ -11,7 +11,18 @@ import { groupBy } from 'lodash'; * @return {Array} Array of terms in tree format. */ export function buildTermsTree( flatTerms ) { - const termsByParent = groupBy( flatTerms, 'parent' ); + const flatTermsWithParentAndChildren = flatTerms.map( ( term ) => { + return { + children: [], + parent: null, + ...term, + }; + } ); + + const termsByParent = groupBy( flatTermsWithParentAndChildren, 'parent' ); + if ( termsByParent.null && termsByParent.null.length ) { + return flatTermsWithParentAndChildren; + } const fillWithChildren = ( terms ) => { return terms.map( ( term ) => { const children = termsByParent[ term.id ]; diff --git a/packages/editor/src/utils/test/terms.js b/packages/editor/src/utils/test/terms.js index 361cc4b414b7a0..11cf1505d4f27e 100644 --- a/packages/editor/src/utils/test/terms.js +++ b/packages/editor/src/utils/test/terms.js @@ -4,10 +4,17 @@ import { buildTermsTree } from '../terms'; describe( 'buildTermsTree()', () => { - it( 'Should return empty array if parent is never specified.', () => { - const input = Object.freeze( [ { term: 2232 }, { term: 2245 } ] ); + it( 'Should return same array as input with null parent and empty children added if parent is never specified.', () => { + const input = Object.freeze( [ + { id: 2232, dummy: true }, + { id: 2245, dummy: true }, + ] ); + const output = Object.freeze( [ + { id: 2232, parent: null, children: [], dummy: true }, + { id: 2245, parent: null, children: [], dummy: true }, + ] ); const termsTreem = buildTermsTree( input ); - expect( termsTreem ).toEqual( [] ); + expect( termsTreem ).toEqual( output ); } ); it( 'Should return same array as input with empty children added if all the elements are top level', () => { const input = Object.freeze( [ From 3c38fce7421855489b9a5577a89eea00cdf792bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corn=C3=A9=20Dorrestijn?= <corne.dorrestijn@gmail.com> Date: Tue, 22 Jan 2019 15:51:17 +0100 Subject: [PATCH 25/56] Fix: :root no longer causes invalid selectors (#13325) --- .../transforms/test/__snapshots__/wrap.js.snap | 6 ++++++ .../editor/src/editor-styles/transforms/test/wrap.js | 11 +++++++++++ packages/editor/src/editor-styles/transforms/wrap.js | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/editor-styles/transforms/test/__snapshots__/wrap.js.snap b/packages/editor/src/editor-styles/transforms/test/__snapshots__/wrap.js.snap index 873091eacb77d8..9060dda7470295 100644 --- a/packages/editor/src/editor-styles/transforms/test/__snapshots__/wrap.js.snap +++ b/packages/editor/src/editor-styles/transforms/test/__snapshots__/wrap.js.snap @@ -41,3 +41,9 @@ exports[`CSS selector wrap should wrap regular selectors 1`] = ` color: red; }" `; + +exports[`CSS selector wrap should replace :root selectors 1`] = ` +".my-namespace { +--my-color: #ff0000; +}" +`; diff --git a/packages/editor/src/editor-styles/transforms/test/wrap.js b/packages/editor/src/editor-styles/transforms/test/wrap.js index 5500d4a747e41a..2a39ff3db3115b 100644 --- a/packages/editor/src/editor-styles/transforms/test/wrap.js +++ b/packages/editor/src/editor-styles/transforms/test/wrap.js @@ -61,4 +61,15 @@ describe( 'CSS selector wrap', () => { expect( output ).toMatchSnapshot(); } ); + + it( 'should replace :root selectors', () => { + const callback = wrap( '.my-namespace' ); + const input = ` + :root { + --my-color: #ff0000; + }`; + const output = traverse( input, callback ); + + expect( output ).toMatchSnapshot(); + } ); } ); diff --git a/packages/editor/src/editor-styles/transforms/wrap.js b/packages/editor/src/editor-styles/transforms/wrap.js index dad6df2b0c8e6a..6c89562d78a9ae 100644 --- a/packages/editor/src/editor-styles/transforms/wrap.js +++ b/packages/editor/src/editor-styles/transforms/wrap.js @@ -6,7 +6,7 @@ import { includes } from 'lodash'; /** * @const string IS_ROOT_TAG Regex to check if the selector is a root tag selector. */ -const IS_ROOT_TAG = /^(body|html).*$/; +const IS_ROOT_TAG = /^(body|html|:root).*$/; const wrap = ( namespace, ignore = [] ) => ( node ) => { const updateSelector = ( selector ) => { @@ -20,7 +20,7 @@ const wrap = ( namespace, ignore = [] ) => ( node ) => { }} // HTML and Body elements cannot be contained within our container so lets extract their styles. - return selector.replace( /^(body|html)/, namespace ); + return selector.replace( /^(body|html|:root)/, namespace ); }; if ( node.type === 'rule' ) { From 695860f604548f39f034376db99b6da786b1f4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= <grzegorz@gziolo.pl> Date: Tue, 22 Jan 2019 16:01:54 +0100 Subject: [PATCH 26/56] Docs: Move packages section out of CONTRIBUTING.md (#13418) * Docs: Move packages section out of CONTRIBUTING.md * Update precommit hook to look at new toc.json file --- CONTRIBUTING.md | 142 ++++----------------------------------------- package.json | 2 +- packages/README.md | 128 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 132 deletions(-) create mode 100644 packages/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 799c90da662290..2fb8900a49c786 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,11 +2,11 @@ Thank you for thinking about contributing to WordPress' Gutenberg project! If you're unsure of anything, know that you're 💯 welcome to submit an issue or pull request on any topic. The worst that can happen is that you'll be politely directed to the best location to ask your question or to change something in your pull request. We appreciate any sort of contribution and don't want a wall of rules to get in the way of that. -As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md). +As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [Code of Conduct](/CODE_OF_CONDUCT.md). -Before contributing, we encourage you to read our [Contributing Policy](CONTRIBUTING.md) (you're here already!) and our [Handbook](https://wordpress.org/gutenberg/handbook/). If you have any questions on any of these, please open an issue so we can help clarify them. +Before contributing, we encourage you to read our [Contributing Policy](/CONTRIBUTING.md) (you're here already!) and our [Handbook](https://wordpress.org/gutenberg/handbook/). If you have any questions on any of these, please open an issue so we can help clarify them. -All WordPress projects are [licensed under the GPLv2+](LICENSE.md), and all contributions to Gutenberg will be released under the GPLv2+ license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv2+ license. +All WordPress projects are [licensed under the GPLv2+](/LICENSE.md), and all contributions to Gutenberg will be released under the GPLv2+ license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv2+ license. ## Getting Started @@ -60,7 +60,7 @@ Welcome to... ``` The WordPress installation should be available at `http://localhost:8888` (**Username**: `admin`, **Password**: `password`). -Inside the "docker" directory, you can use any docker command to interact with your containers. If this port is in use, you can override it in your `docker-compose.override.yml` file. If you're running [e2e tests](https://wordpress.org/gutenberg/handbook/reference/testing-overview/#end-to-end-testing), this change will be used correctly. +Inside the "docker" directory, you can use any docker command to interact with your containers. If this port is in use, you can override it in your `docker-compose.override.yml` file. If you're running [e2e tests](/docs/contributors/testing-overview.md#end-to-end-testing), this change will be used correctly. To bring down this local WordPress instance later run: ``` @@ -104,137 +104,17 @@ For example, `add/gallery-block` means you're working on adding a new gallery bl You can pick among all the <a href="https://github.com/WordPress/gutenberg/issues">tickets</a>, or some of the ones labelled <a href="https://github.com/WordPress/gutenberg/labels/Good%20First%20Issue">Good First Issue</a>. -The workflow is documented in greater detail in the [repository management](./docs/contributors/repository-management.md) document. +The workflow is documented in greater detail in the [repository management](/docs/contributors/repository-management.md) document. ## Testing -Gutenberg contains both PHP and JavaScript code and encourages testing and code style linting for both. It also incorporates end-to-end testing using [Google Puppeteer](https://developers.google.com/web/tools/puppeteer/). You can find out more details in [Testing Overview document](./docs/contributors/testing-overview.md). +Gutenberg contains both PHP and JavaScript code and encourages testing and code style linting for both. It also incorporates end-to-end testing using [Google Puppeteer](https://developers.google.com/web/tools/puppeteer/). You can find out more details in [Testing Overview document](/docs/contributors/testing-overview.md). ## Managing Packages -This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. - -### Creating a New Package - -When creating a new package, you need to provide at least the following: - -1. `package.json` based on the template: - ```json - { - "name": "@wordpress/package-name", - "version": "1.0.0-beta.0", - "description": "Package description.", - "author": "The WordPress Contributors", - "license": "GPL-2.0-or-later", - "keywords": [ - "wordpress" - ], - "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/package-name/README.md", - "repository": { - "type": "git", - "url": "https://github.com/WordPress/gutenberg.git" - }, - "bugs": { - "url": "https://github.com/WordPress/gutenberg/issues" - }, - "main": "build/index.js", - "module": "build-module/index.js", - "react-native": "src/index", - "dependencies": { - "@babel/runtime": "^7.0.0" - }, - "publishConfig": { - "access": "public" - } - } - ``` - This assumes that your code is located in the `src` folder and will be transpiled with `Babel`. -2. `.npmrc` file which disables creating `package-lock.json` file for the package: - ``` - package-lock=false - ``` -3. `README.md` file containing at least: - - Package name - - Package description - - Installation details - - Usage example - - `Code is Poetry` logo (`<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>`) - -### Maintaining Changelogs - -Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. All packages should follow the [Semantic Versioning (`semver`) specification](https://semver.org/). - -The developer who proposes a change (pull request) is responsible for choosing the correct version increment (`major`, `minor`, or `patch`) according to the following guidelines: - -- Major version X (X.y.z | X > 0) should be changed with any backward incompatible/"breaking" change. This will usually occur at the final stage of deprecating and removing of a feature. -- Minor version Y (x.Y.z | x > 0) should be changed when you add functionality or change functionality in a backward compatible manner. It must be incremented if any public API functionality is marked as deprecated. -- Patch version Z (x.y.Z | x > 0) should be incremented when you make backward compatible bug fixes. - -When in doubt, refer to [Semantic Versioning specification](https://semver.org/). - -_Example:_ - -```md -## v1.2.2 (Unreleased) - -### Bug Fix - -- ... -- ... -``` - -- If you need to add something considered a bug fix, you add the item to `Bug Fix` section and leave the version as 1.2.2. -- If it's a new feature, you add the item to `New Feature` section and change version to 1.3.0. -- If it's a breaking change you want to introduce, add the item to `Breaking Change` section and bump the version to 2.0.0. -- If you struggle to classify a change as one of the above, then it might be not necessary to include it. - -The version bump is only necessary if one of the following applies: - - There are no other unreleased changes. - - The type of change you're introducing is incompatible (more severe) than the other unreleased changes. - -### Releasing Packages - -Lerna automatically releases all outdated packages. To check which packages are outdated and will be released, type `npm run publish:check`. - -If you have the ability to publish packages, you _must_ have [2FA enabled](https://docs.npmjs.com/getting-started/using-two-factor-authentication) on your [npm account][npm]. - -#### Before Releasing - -Confirm that you're logged in to [npm], by running `npm whoami`. If you're not logged in, run `npm adduser` to login. - -If you're publishing a new package, ensure that its `package.json` file contains the correct `publishConfig` settings: - -```json -{ - "publishConfig": { - "access": "public" - } -} -``` - -You can check your package configs by running `npm run lint-pkg-json`. - -#### Development Release - -Run the following command to release a dev version of the outdated packages, replacing `123456` with your 2FA code. Make sure you're using a freshly generated 2FA code, rather than one that's about to timeout. This is a little cumbersome but helps to prevent the release process from dying mid-deploy. - -```bash -NPM_CONFIG_OTP=123456 npm run publish:dev -``` - -Lerna will ask you which version number you want to choose for each package. For a `dev` release, you'll more likely want to choose the "prerelease" option. Repeat the same for all the outdated packages and confirm your version updates. - -Lerna will then publish to [npm], commit the `package.json` changes and create the git tags. - -#### Production Release - -To release a production version for the outdated packages, run the following command, replacing `123456` with your (freshly generated, as above) 2FA code: - -```bash -NPM_CONFIG_OTP=123456 npm run publish:prod -``` +This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation. -Choose the correct version based on `CHANGELOG.md` files, confirm your choices and let Lerna do its magic. +Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section. ## How Can Designers Contribute? @@ -244,15 +124,15 @@ If you'd like to contribute to the design or front-end, feel free to contribute Documentation is automatically synced from master to the [Gutenberg Documentation Website](https://wordpress.org/gutenberg/handbook/) every 15 minutes. -To add a new documentation page, you'll have to create a Markdown file in the [docs](https://github.com/WordPress/gutenberg/tree/master/docs) folder and add an item to the [root-manifest.json](https://github.com/WordPress/gutenberg/blob/master/docs/root-manifest.json). +To add a new documentation page, you'll have to create a Markdown file in the [docs](https://github.com/WordPress/gutenberg/tree/master/docs) folder and add an item to the [toc.json](/docs/toc.json). ### `@wordpress/component` -If you're contributing to the documentation of any component from the `@wordpress/component` package, take a look at its [guidelines for contributing](./packages/components/CONTRIBUTING.md). +If you're contributing to the documentation of any component from the `@wordpress/component` package, take a look at its [guidelines for contributing](/packages/components/CONTRIBUTING.md). ## Reporting Security Issues -Please see [SECURITY.md](./SECURITY.md). +Please see [SECURITY.md](/SECURITY.md). ## Localizing Gutenberg Plugin diff --git a/package.json b/package.json index ccfebf409fcd26..4a75bd538b9a6f 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "*.js": [ "wp-scripts lint-js" ], - "{docs/{root-manifest.json,tool/*.js},packages/{*/README.md,*/src/{actions,selectors}.js,components/src/*/**/README.md}}": [ + "{docs/{toc.json,tool/*.js},packages/{*/README.md,*/src/{actions,selectors}.js,components/src/*/**/README.md}}": [ "npm run docs:build" ] } diff --git a/packages/README.md b/packages/README.md new file mode 100644 index 00000000000000..315a53740bc1c4 --- /dev/null +++ b/packages/README.md @@ -0,0 +1,128 @@ +## Managing Packages + +This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. + +### Creating a New Package + +When creating a new package, you need to provide at least the following: + +1. `package.json` based on the template: + ```json + { + "name": "@wordpress/package-name", + "version": "1.0.0-beta.0", + "description": "Package description.", + "author": "The WordPress Contributors", + "license": "GPL-2.0-or-later", + "keywords": [ + "wordpress" + ], + "homepage": "https://github.com/WordPress/gutenberg/tree/master/packages/package-name/README.md", + "repository": { + "type": "git", + "url": "https://github.com/WordPress/gutenberg.git" + }, + "bugs": { + "url": "https://github.com/WordPress/gutenberg/issues" + }, + "main": "build/index.js", + "module": "build-module/index.js", + "react-native": "src/index", + "dependencies": { + "@babel/runtime": "^7.0.0" + }, + "publishConfig": { + "access": "public" + } + } + ``` + This assumes that your code is located in the `src` folder and will be transpiled with `Babel`. +2. `.npmrc` file which disables creating `package-lock.json` file for the package: + ``` + package-lock=false + ``` +3. `README.md` file containing at least: + - Package name + - Package description + - Installation details + - Usage example + - `Code is Poetry` logo (`<br/><br/><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>`) + +### Maintaining Changelogs + +Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. All packages should follow the [Semantic Versioning (`semver`) specification](https://semver.org/). + +The developer who proposes a change (pull request) is responsible for choosing the correct version increment (`major`, `minor`, or `patch`) according to the following guidelines: + +- Major version X (X.y.z | X > 0) should be changed with any backward incompatible/"breaking" change. This will usually occur at the final stage of deprecating and removing of a feature. +- Minor version Y (x.Y.z | x > 0) should be changed when you add functionality or change functionality in a backward compatible manner. It must be incremented if any public API functionality is marked as deprecated. +- Patch version Z (x.y.Z | x > 0) should be incremented when you make backward compatible bug fixes. + +When in doubt, refer to [Semantic Versioning specification](https://semver.org/). + +_Example:_ + +```md +## v1.2.2 (Unreleased) + +### Bug Fix + +- ... +- ... +``` + +- If you need to add something considered a bug fix, you add the item to `Bug Fix` section and leave the version as 1.2.2. +- If it's a new feature, you add the item to `New Feature` section and change version to 1.3.0. +- If it's a breaking change you want to introduce, add the item to `Breaking Change` section and bump the version to 2.0.0. +- If you struggle to classify a change as one of the above, then it might be not necessary to include it. + +The version bump is only necessary if one of the following applies: + - There are no other unreleased changes. + - The type of change you're introducing is incompatible (more severe) than the other unreleased changes. + +### Releasing Packages + +Lerna automatically releases all outdated packages. To check which packages are outdated and will be released, type `npm run publish:check`. + +If you have the ability to publish packages, you _must_ have [2FA enabled](https://docs.npmjs.com/getting-started/using-two-factor-authentication) on your [npm account][npm]. + +#### Before Releasing + +Confirm that you're logged in to [npm], by running `npm whoami`. If you're not logged in, run `npm adduser` to login. + +If you're publishing a new package, ensure that its `package.json` file contains the correct `publishConfig` settings: + +```json +{ + "publishConfig": { + "access": "public" + } +} +``` + +You can check your package configs by running `npm run lint-pkg-json`. + +#### Development Release + +Run the following command to release a dev version of the outdated packages, replacing `123456` with your 2FA code. Make sure you're using a freshly generated 2FA code, rather than one that's about to timeout. This is a little cumbersome but helps to prevent the release process from dying mid-deploy. + +```bash +NPM_CONFIG_OTP=123456 npm run publish:dev +``` + +Lerna will ask you which version number you want to choose for each package. For a `dev` release, you'll more likely want to choose the "prerelease" option. Repeat the same for all the outdated packages and confirm your version updates. + +Lerna will then publish to [npm], commit the `package.json` changes and create the git tags. + +#### Production Release + +To release a production version for the outdated packages, run the following command, replacing `123456` with your (freshly generated, as above) 2FA code: + +```bash +NPM_CONFIG_OTP=123456 npm run publish:prod +``` + +Choose the correct version based on `CHANGELOG.md` files, confirm your choices and let Lerna do its magic. + +[lerna]: https://lernajs.io/ +[npm]: https://www.npmjs.com/ From 6f6181ee61085289cd95b047f4cfd9135d0b8549 Mon Sep 17 00:00:00 2001 From: Mel Choyce <melchoyce@users.noreply.github.com> Date: Tue, 22 Jan 2019 11:49:03 -0500 Subject: [PATCH 27/56] Update DropdownMenu readme (#13410) Adding documentation to describe the use and functionality of the DropdownMenu component. Thanks @sarahmonster and @jasmussen for drafting this. --- .../components/src/dropdown-menu/README.md | 66 +++++++++++++++++-- 1 file changed, 59 insertions(+), 7 deletions(-) diff --git a/packages/components/src/dropdown-menu/README.md b/packages/components/src/dropdown-menu/README.md index 4d934a3ee92045..9346140bb27ef0 100644 --- a/packages/components/src/dropdown-menu/README.md +++ b/packages/components/src/dropdown-menu/README.md @@ -1,8 +1,60 @@ -# Dropdown Menu +# DropdownMenu -Dropdown Menu is a React component to render an expandable menu of buttons. It is similar in purpose to a `<select>` element, with the distinction that it does not maintain a value. Instead, each option behaves as an action button. +The DropdownMenu displays a list of actions (each contained in a MenuItem, MenuItemsChoice, or MenuGroup) in a compact way. It appears in a Popover after the user has interacted with an element (a button or icon) or when they perform a specific action. -## Usage +![An expanded DropdownMenu, containing a list of MenuItems.](https://wordpress.org/gutenberg/files/2019/01/DropdownMenuExample.png) + +## Table of contents + +1. [Design guidelines](#design-guidelines) +2. [Development guidelines](#development-guidelines) + +## Anatomy + +![Anatomy of a DropdownMenu.](https://wordpress.org/gutenberg/files/2019/01/DropdownMenuAnatomy.png) + +1. Popover: a container component in which the DropdownMenu is wrapped. +2. Parent button: the icon or button that is used to toggle the display of the Popover containing the DropdownMenu. +3. MenuItem: the list items within the DropdownMenu. + +## Design guidelines + +### Usage + +#### When to use a DropdownMenu + +Use a DropdownMenu when you want users to: + +- Choose an action or change a setting from a list, AND +- Only see the available choices contextually. + +If you need to display all the available options at all times, consider using a Toolbar instead. + +![Use a DropdownMenu to display a list of actions after the user interacts with an icon.](https://wordpress.org/gutenberg/files/2019/01/DropdownMenuDo.png) + +**Do** +Use a DropdownMenu to display a list of actions after the user interacts with an icon. + +![Don’t use a DropdownMenu for important actions that should always be visible. Use a Toolbar instead.](https://wordpress.org/gutenberg/files/2019/01/DropdownMenuDont.png) + +**Don’t** +Don’t use a DropdownMenu for frequently used actions. Use a Toolbar instead. + +#### Behavior + +Generally, the parent button should have a triangular icon to the right of the icon or text to indicate that interacting with it will show a DropdownMenu. In rare cases where the parent button directly indicates that there'll be more content (through the use of an ellipsis or "More" label), this can be omitted. + +The parent button should retain the same visual styling regardless of whether the DropdownMenu is displayed or not. + +#### Placement + +The DropdownMenu should typically appear directly below, or below and to the left of, the parent button. If there isn’t enough space below to display the full DropdownMenu, it can be displayed instead above the parent button. + +## Development guidelines + +DropdownMenu is a React component to render an expandable menu of buttons. It is similar in purpose to a `<select>` element, with the distinction that it does not maintain a value. Instead, each option behaves as an action button. + +### Usage Render a Dropdown Menu with a set of controls: @@ -39,11 +91,11 @@ const MyDropdownMenu = () => ( ); ``` -## Props +### Props The component accepts the following props: -### icon +#### icon The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug to be shown in the collapsed menu button. @@ -53,14 +105,14 @@ The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug to See also: [https://developer.wordpress.org/resource/dashicons/](https://developer.wordpress.org/resource/dashicons/) -### label +#### label A human-readable label to present as accessibility text on the focused collapsed menu button. - Type: `String` - Required: Yes -### controls +#### controls An array of objects describing the options to be shown in the expanded menu. From af9ea75664c29befe35cd8526af0ea8b4f05b070 Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Tue, 22 Jan 2019 12:28:12 -0500 Subject: [PATCH 28/56] eslint-plugin: Enforce object-shorthand (#13400) * Packages: Use object shorthand notation when possible * eslint-plugin: Enforce object-shorthand * Docs: Remove coding guidelines merged upstream to WP standard * Docs: Add object shorthand style to coding guidelines --- docs/contributors/coding-guidelines.md | 80 ++++--------------- docs/tool/manifest.js | 6 +- packages/block-library/src/classic/edit.js | 2 +- packages/block-library/src/html/index.js | 2 +- packages/block-library/src/paragraph/index.js | 4 +- packages/block-library/src/verse/index.js | 4 +- .../components/src/button/index.native.js | 8 +- .../components/src/color-palette/index.js | 2 +- .../src/form-token-field/test/index.js | 4 +- .../edit-post/src/components/header/index.js | 2 +- .../src/components/block-draggable/index.js | 4 +- .../src/components/inserter/test/menu.js | 2 +- .../editor/src/editor-styles/ast/parse.js | 14 ++-- packages/eslint-plugin/CHANGELOG.md | 6 ++ packages/eslint-plugin/configs/esnext.js | 1 + packages/hooks/src/createHooks.js | 4 +- packages/rich-text/src/create.js | 2 +- 17 files changed, 54 insertions(+), 93 deletions(-) diff --git a/docs/contributors/coding-guidelines.md b/docs/contributors/coding-guidelines.md index c47fda1ab070a5..1b4524ffcf9ac7 100644 --- a/docs/contributors/coding-guidelines.md +++ b/docs/contributors/coding-guidelines.md @@ -102,76 +102,30 @@ If an API must be exposed but is clearly not intended to be supported into the f export { __unstableDoAction } from './api'; ``` -### Variable Naming +### Objects -Gutenberg inherits [WordPress' naming conventions of camel-casing](https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/#naming-conventions): - ->Variable and function names should be full words, using camel case with a lowercase first letter. This is an area where this standard differs from the WordPress PHP coding standards. -> ->Constructors intended for use with `new` should have a capital first letter (UpperCamelCase). - -However, Gutenberg is more specific about its handling of abbreviations, acronyms, constants, and the ES2015 class construct. - -#### Abbreviations and Acronyms - -[*Abbreviations*](https://en.wikipedia.org/wiki/Abbreviation) must be written as camel case, with an initial capitalized letter followed by lowercase letters. - -[*Acronyms*](https://en.wikipedia.org/wiki/Acronym) must be written with each of its composing letters capitalized. This is intended to reflect that each letter of the acronym is a proper word in its expanded form. - -If an abbreviation or an acronym occurs at the start of a variable name, it must be written to respect the camelcase naming rules covering the first letter of a variable or class definition. For variable assignment, this means writing the abbreviation entirely as lowercase. For class definitions, its initial letter should be capitalized. - -**Examples:** - -```js -// "Id" is an abbreviation of "Identifier": -const userId = 1; - -// "DOM" is an acronym of "Document Object Model": -const currentDOMDocument = window.document; - -// Acronyms and abbreviations at the start of a variable name are consistent -// with camelcase rules covering the first letter of a variable or class. -const domDocument = window.document; -class DOMDocument {} -class IdCollection {} -``` - -#### Class Definition - -A [`class` definition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) must use the UpperCamelCase convention, regardless of whether it is intended to be used with `new` construction. - -**Example:** +When possible, use [shorthand notation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#New_notations_in_ECMAScript_2015) when defining object property values: ```js -class Earth { - static addHuman( human ) { - Earth.humans.push( human ); - } - - static getHumans() { - return Earth.humans; - } -} - -Earth.humans = []; -``` - -All `@wordpress/element` Components, including stateless function components, should be named using Class Definition naming rules, both for consistency and to reflect the fact that a component may need to be transitioned from a function to a class without breaking compatibility. - -**Examples:** +const a = 10; -```js -class MyComponent extends Component {} +// Bad: +const object = { + a: a, + performAction: function() { + // ... + }, +}; -function MyComponent() {} +// Good: +const object = { + a, + performAction() { + // ... + }, +}; ``` -#### Constants - -An exception to camel case is made for constant values which are never intended to be reassigned or mutated. Such variables must use the [SCREAMING_SNAKE_CASE convention](https://en.wikipedia.org/wiki/Snake_case). - -In almost all cases, a constant should be defined in the top-most scope of a file. It is important to note that [JavaScript's `const` assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const) is conceptually more limited than what is implied here, where a value assigned by `const` in JavaScript can in-fact be mutated, and is only protected against reassignment. A constant as defined in these coding guidelines applies only to values which are expected to never change, and is a strategy for developers to communicate intent more so than it is a technical restriction. - ### Strings String literals should be declared with single-quotes *unless* the string itself contains a single-quote that would need to be escaped–in that case: use a double-quote. If the string contains a single-quote *and* a double-quote, you can use ES6 template strings to avoid escaping the quotes. diff --git a/docs/tool/manifest.js b/docs/tool/manifest.js index 06732edc108dc9..56f7a2c8772c4b 100644 --- a/docs/tool/manifest.js +++ b/docs/tool/manifest.js @@ -91,10 +91,10 @@ function generateRootManifestFromTOCItems( items, parent = null ) { } pageItems.push( { - title: title, - slug: slug, + title, + slug, markdown_source: `${ baseRepoUrl }\/${ fileName }`, - parent: parent, + parent, } ); if ( Array.isArray( children ) && children.length ) { pageItems = pageItems.concat( generateRootManifestFromTOCItems( children, slug ) ); diff --git a/packages/block-library/src/classic/edit.js b/packages/block-library/src/classic/edit.js index f0eb37ff30ca9b..49c1ec2340e506 100644 --- a/packages/block-library/src/classic/edit.js +++ b/packages/block-library/src/classic/edit.js @@ -128,7 +128,7 @@ export default class ClassicEdit extends Component { editor.addButton( 'kitchensink', { tooltip: _x( 'More', 'button to expand options' ), icon: 'dashicon dashicons-editor-kitchensink', - onClick: function() { + onClick() { const button = this; const active = ! button.active(); diff --git a/packages/block-library/src/html/index.js b/packages/block-library/src/html/index.js index 74233c565036ec..b537f2a8d6e421 100644 --- a/packages/block-library/src/html/index.js +++ b/packages/block-library/src/html/index.js @@ -59,7 +59,7 @@ export const settings = { ], }, - edit: edit, + edit, save( { attributes } ) { return <RawHTML>{ attributes.content }</RawHTML>; diff --git a/packages/block-library/src/paragraph/index.js b/packages/block-library/src/paragraph/index.js index e315f551cc9f3f..934efe8dc1c90d 100644 --- a/packages/block-library/src/paragraph/index.js +++ b/packages/block-library/src/paragraph/index.js @@ -174,9 +174,9 @@ export const settings = { 'has-drop-cap': dropCap, } ); const styles = { - backgroundColor: backgroundColor, + backgroundColor, color: textColor, - fontSize: fontSize, + fontSize, textAlign: align, }; diff --git a/packages/block-library/src/verse/index.js b/packages/block-library/src/verse/index.js index 46bfac96d22082..0993bfa4f9c7eb 100644 --- a/packages/block-library/src/verse/index.js +++ b/packages/block-library/src/verse/index.js @@ -76,7 +76,7 @@ export const settings = { content: nextContent, } ); } } - style={ { textAlign: textAlign } } + style={ { textAlign } } placeholder={ __( 'Write…' ) } wrapperClassName={ className } onMerge={ mergeBlocks } @@ -91,7 +91,7 @@ export const settings = { return ( <RichText.Content tagName="pre" - style={ { textAlign: textAlign } } + style={ { textAlign } } value={ content } /> ); diff --git a/packages/components/src/button/index.native.js b/packages/components/src/button/index.native.js index cd38fecd9ed2c2..176498ecd113bc 100644 --- a/packages/components/src/button/index.native.js +++ b/packages/components/src/button/index.native.js @@ -37,16 +37,16 @@ const styles = StyleSheet.create( { fontWeight: 'bold', fontSize: 13, alignSelf: 'flex-end', - marginLeft: marginLeft, - marginBottom: marginBottom, + marginLeft, + marginBottom, }, subscriptActive: { color: 'white', fontWeight: 'bold', fontSize: 13, alignSelf: 'flex-end', - marginLeft: marginLeft, - marginBottom: marginBottom, + marginLeft, + marginBottom, }, } ); diff --git a/packages/components/src/color-palette/index.js b/packages/components/src/color-palette/index.js index 3dfe358954e1f3..c70db00206f49b 100644 --- a/packages/components/src/color-palette/index.js +++ b/packages/components/src/color-palette/index.js @@ -27,7 +27,7 @@ export default function ColorPalette( { colors, disableCustomColors = false, val return ( <div className={ classes }> { map( colors, ( { color, name } ) => { - const style = { color: color }; + const style = { color }; const itemClasses = classnames( 'components-color-palette__item', { 'is-active': value === color } ); return ( diff --git a/packages/components/src/form-token-field/test/index.js b/packages/components/src/form-token-field/test/index.js index 1fb0992fff5567..3199cdfa447cd3 100644 --- a/packages/components/src/form-token-field/test/index.js +++ b/packages/components/src/form-token-field/test/index.js @@ -49,7 +49,7 @@ describe( 'FormTokenField', function() { TestUtils.Simulate.keyDown( wrapperElement(), { - keyCode: keyCode, + keyCode, shiftKey: ! ! shiftKey, } ); @@ -58,7 +58,7 @@ describe( 'FormTokenField', function() { function sendKeyPress( charCode ) { TestUtils.Simulate.keyPress( wrapperElement(), - { charCode: charCode } + { charCode } ); } diff --git a/packages/edit-post/src/components/header/index.js b/packages/edit-post/src/components/header/index.js index 0663fcd5f98b36..3f3ed97063cd8c 100644 --- a/packages/edit-post/src/components/header/index.js +++ b/packages/edit-post/src/components/header/index.js @@ -92,7 +92,7 @@ export default compose( return { openGeneralSidebar: () => openGeneralSidebar( getBlockSelectionStart() ? 'edit-post/block' : 'edit-post/document' ), - closeGeneralSidebar: closeGeneralSidebar, + closeGeneralSidebar, }; } ), )( Header ); diff --git a/packages/editor/src/components/block-draggable/index.js b/packages/editor/src/components/block-draggable/index.js index a9c3e6cad0d8ea..27a44ce2a852b6 100644 --- a/packages/editor/src/components/block-draggable/index.js +++ b/packages/editor/src/components/block-draggable/index.js @@ -22,8 +22,8 @@ const BlockDraggable = ( { children, clientId, rootClientId, blockElementId, ind { ( { onDraggableStart, onDraggableEnd } ) => { return children( { - onDraggableStart: onDraggableStart, - onDraggableEnd: onDraggableEnd, + onDraggableStart, + onDraggableEnd, } ); } } diff --git a/packages/editor/src/components/inserter/test/menu.js b/packages/editor/src/components/inserter/test/menu.js index 7538f1639b1fca..0ad4ef34c1a5df 100644 --- a/packages/editor/src/components/inserter/test/menu.js +++ b/packages/editor/src/components/inserter/test/menu.js @@ -93,7 +93,7 @@ const items = [ const DEFAULT_PROPS = { position: 'top center', - items: items, + items, debouncedSpeak: noop, fetchReusableBlocks: noop, setTimeout: noop, diff --git a/packages/editor/src/editor-styles/ast/parse.js b/packages/editor/src/editor-styles/ast/parse.js index 0c91c972f7ba33..4f7e925c9937e1 100644 --- a/packages/editor/src/editor-styles/ast/parse.js +++ b/packages/editor/src/editor-styles/ast/parse.js @@ -36,7 +36,7 @@ export default function( css, options ) { */ function position() { - const start = { line: lineno, column: column }; + const start = { line: lineno, column }; return function( node ) { node.position = new Position( start ); whitespace(); @@ -50,7 +50,7 @@ export default function( css, options ) { function Position( start ) { this.start = start; - this.end = { line: lineno, column: column }; + this.end = { line: lineno, column }; this.source = options.source; } @@ -351,8 +351,8 @@ export default function( css, options ) { return pos( { type: 'keyframes', - name: name, - vendor: vendor, + name, + vendor, keyframes: frames, } ); } @@ -382,7 +382,7 @@ export default function( css, options ) { return pos( { type: 'supports', - supports: supports, + supports, rules: style, } ); } @@ -440,7 +440,7 @@ export default function( css, options ) { return pos( { type: 'media', - media: media, + media, rules: style, } ); } @@ -527,7 +527,7 @@ export default function( css, options ) { return pos( { type: 'document', document: doc, - vendor: vendor, + vendor, rules: style, } ); } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 3d6a36751ddd1d..0ab0b2624c58d8 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.0.0 (Unreleased) + +### Breaking Changes + +- The `esnext` and `recommended` rulesets now enforce [`object-shorthand`](https://eslint.org/docs/rules/object-shorthand) + ## 1.0.0 (2018-12-12) ### New Features diff --git a/packages/eslint-plugin/configs/esnext.js b/packages/eslint-plugin/configs/esnext.js index 7e01f959fde72d..8ea39cb8649665 100644 --- a/packages/eslint-plugin/configs/esnext.js +++ b/packages/eslint-plugin/configs/esnext.js @@ -23,6 +23,7 @@ module.exports = { 'no-useless-computed-key': 'error', 'no-useless-constructor': 'error', 'no-var': 'error', + 'object-shorthand': 'error', 'prefer-const': 'error', quotes: [ 'error', 'single', { allowTemplateLiterals: true, avoidEscape: true } ], 'space-unary-ops': [ 'error', { diff --git a/packages/hooks/src/createHooks.js b/packages/hooks/src/createHooks.js index 3e5c0dbf934f0b..9915a1167e31f9 100644 --- a/packages/hooks/src/createHooks.js +++ b/packages/hooks/src/createHooks.js @@ -34,8 +34,8 @@ function createHooks() { doingFilter: createDoingHook( filters ), didAction: createDidHook( actions ), didFilter: createDidHook( filters ), - actions: actions, - filters: filters, + actions, + filters, }; } diff --git a/packages/rich-text/src/create.js b/packages/rich-text/src/create.js index c45d20ce088be0..d320e5fcfcdf22 100644 --- a/packages/rich-text/src/create.js +++ b/packages/rich-text/src/create.js @@ -124,7 +124,7 @@ export function create( { if ( typeof text === 'string' && text.length > 0 ) { return { formats: Array( text.length ), - text: text, + text, }; } From 062857351c4e7b859a9eda021222353ca8d866af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= <grzegorz@gziolo.pl> Date: Tue, 22 Jan 2019 18:48:40 +0100 Subject: [PATCH 29/56] Docs: Add section about using link in documentation (#13422) --- CONTRIBUTING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2fb8900a49c786..41fbdc022d8f65 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -126,6 +126,20 @@ Documentation is automatically synced from master to the [Gutenberg Documentatio To add a new documentation page, you'll have to create a Markdown file in the [docs](https://github.com/WordPress/gutenberg/tree/master/docs) folder and add an item to the [toc.json](/docs/toc.json). +### Using links + +It's very likely that at some point you will want to link to other documentation pages. It's worth emphasizing that all documents can be browsed in different contexts: +- Gutenberg Handbook +- GitHub website +- npm website + +That's why it's recommended to use absolute links without the `https://github.com/WordPress/gutenberg` part for all files which match the following patterns: +- `/docs/*.md` +- `/packages/*/README.md` +- `/packages/components/src/**/README.md` + +This way they will be properly handled in all three aforementioned contexts. + ### `@wordpress/component` If you're contributing to the documentation of any component from the `@wordpress/component` package, take a look at its [guidelines for contributing](/packages/components/CONTRIBUTING.md). From 527e25c9d212e2aea3572eec3c0521698d6db98d Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Tue, 22 Jan 2019 13:52:09 -0500 Subject: [PATCH 30/56] Components: Handle multiple Slots by same name (#12882) --- packages/components/CHANGELOG.md | 4 ++ packages/components/src/slot-fill/context.js | 26 ++++++++- packages/components/src/slot-fill/fill.js | 2 +- packages/components/src/slot-fill/slot.js | 2 +- .../slot-fill/test/__snapshots__/slot.js.snap | 54 +++++++++++++++++++ .../components/src/slot-fill/test/slot.js | 44 +++++++++++++++ 6 files changed, 128 insertions(+), 4 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 93591222faad99..ad2e5be8e71211 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -5,6 +5,10 @@ - `withFilters` has been optimized to avoid binding hook handlers for each mounted instance of the component, instead using a single centralized hook delegator. - `withFilters` has been optimized to reuse a single shared component definition for all filtered instances of the component. +### Bug Fixes + +- Resolves a conflict where two instance of Slot would produce an inconsistent or duplicated rendering output. + ## 7.0.5 (2019-01-03) ## 7.0.4 (2018-12-12) diff --git a/packages/components/src/slot-fill/context.js b/packages/components/src/slot-fill/context.js index df4476fea5b9ce..a39ac94013e0af 100644 --- a/packages/components/src/slot-fill/context.js +++ b/packages/components/src/slot-fill/context.js @@ -41,12 +41,21 @@ class SlotFillProvider extends Component { } registerSlot( name, slot ) { + const previousSlot = this.slots[ name ]; this.slots[ name ] = slot; this.forceUpdateFills( name ); // Sometimes the fills are registered after the initial render of slot // But before the registerSlot call, we need to rerender the slot this.forceUpdateSlot( name ); + + // If a new instance of a slot is being mounted while another with the + // same name exists, force its update _after_ the new slot has been + // assigned into the instance, such that its own rendering of children + // will be empty (the new Slot will subsume all fills for this name). + if ( previousSlot ) { + previousSlot.forceUpdate(); + } } registerFill( name, instance ) { @@ -57,7 +66,14 @@ class SlotFillProvider extends Component { this.forceUpdateSlot( name ); } - unregisterSlot( name ) { + unregisterSlot( name, instance ) { + // If a previous instance of a Slot by this name unmounts, do nothing, + // as the slot and its fills should only be removed for the current + // known instance. + if ( this.slots[ name ] !== instance ) { + return; + } + delete this.slots[ name ]; this.forceUpdateFills( name ); } @@ -75,7 +91,13 @@ class SlotFillProvider extends Component { return this.slots[ name ]; } - getFills( name ) { + getFills( name, slotInstance ) { + // Fills should only be returned for the current instance of the slot + // in which they occupy. + if ( this.slots[ name ] !== slotInstance ) { + return []; + } + return sortBy( this.fills[ name ], 'occurrence' ); } diff --git a/packages/components/src/slot-fill/fill.js b/packages/components/src/slot-fill/fill.js index 66b025ca001788..7c2b3fb0ad5a28 100644 --- a/packages/components/src/slot-fill/fill.js +++ b/packages/components/src/slot-fill/fill.js @@ -62,7 +62,7 @@ class FillComponent extends Component { let { children } = this.props; const slot = getSlot( name ); - if ( ! slot || ! slot.props.bubblesVirtually ) { + if ( ! slot || ! slot.node || ! slot.props.bubblesVirtually ) { return null; } diff --git a/packages/components/src/slot-fill/slot.js b/packages/components/src/slot-fill/slot.js index 4f53cd6d103004..13a226eab5de5d 100644 --- a/packages/components/src/slot-fill/slot.js +++ b/packages/components/src/slot-fill/slot.js @@ -63,7 +63,7 @@ class SlotComponent extends Component { return <div ref={ this.bindNode } />; } - const fills = map( getFills( name ), ( fill ) => { + const fills = map( getFills( name, this ), ( fill ) => { const fillKey = fill.occurrence; const fillChildren = isFunction( fill.props.children ) ? fill.props.children( fillProps ) : fill.props.children; diff --git a/packages/components/src/slot-fill/test/__snapshots__/slot.js.snap b/packages/components/src/slot-fill/test/__snapshots__/slot.js.snap index 709d1522fcbf4c..79b43ad4c65c07 100644 --- a/packages/components/src/slot-fill/test/__snapshots__/slot.js.snap +++ b/packages/components/src/slot-fill/test/__snapshots__/slot.js.snap @@ -1,5 +1,59 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Slot bubblesVirtually false should subsume another slot by the same name 1`] = ` +Array [ + <div + data-position="first" + />, + <div + data-position="second" + > + Content + </div>, +] +`; + +exports[`Slot bubblesVirtually false should subsume another slot by the same name 2`] = ` +Array [ + <div + data-position="first" + />, + <div + data-position="second" + > + Content + </div>, +] +`; + +exports[`Slot bubblesVirtually true should subsume another slot by the same name 1`] = ` +Array [ + <div + data-position="first" + > + <div /> + </div>, + <div + data-position="second" + > + <div /> + </div>, +] +`; + +exports[`Slot bubblesVirtually true should subsume another slot by the same name 2`] = ` +Array [ + <div + data-position="first" + />, + <div + data-position="second" + > + <div /> + </div>, +] +`; + exports[`Slot should re-render Slot when not bubbling virtually 1`] = ` Array [ <div> diff --git a/packages/components/src/slot-fill/test/slot.js b/packages/components/src/slot-fill/test/slot.js index a12c9cd99c6cab..47ba2e16de5247 100644 --- a/packages/components/src/slot-fill/test/slot.js +++ b/packages/components/src/slot-fill/test/slot.js @@ -209,4 +209,48 @@ describe( 'Slot', () => { expect( testRenderer.toJSON() ).toMatchSnapshot(); } ); + + [ false, true ].forEach( ( bubblesVirtually ) => { + describe( 'bubblesVirtually ' + bubblesVirtually, () => { + it( 'should subsume another slot by the same name', () => { + const testRenderer = ReactTestRenderer.create( + <Provider> + <div data-position="first"> + <Slot name="egg" bubblesVirtually={ bubblesVirtually } /> + </div> + <div data-position="second"></div> + <Fill name="egg">Content</Fill> + </Provider> + ); + + testRenderer.update( + <Provider> + <div data-position="first"> + <Slot name="egg" bubblesVirtually={ bubblesVirtually } /> + </div> + <div data-position="second"> + <Slot name="egg" bubblesVirtually={ bubblesVirtually } /> + </div> + <Fill name="egg">Content</Fill> + </Provider> + ); + + expect( testRenderer.toJSON() ).toMatchSnapshot(); + + testRenderer.update( + <Provider> + <div data-position="first"></div> + <div data-position="second"> + <Slot name="egg" bubblesVirtually={ bubblesVirtually } /> + </div> + <Fill name="egg">Content</Fill> + </Provider> + ); + + expect( testRenderer.toJSON() ).toMatchSnapshot(); + + expect( testRenderer.getInstance().slots ).toHaveProperty( 'egg' ); + } ); + } ); + } ); } ); From 33d2acb098d5399dbba206b979be54aad015497e Mon Sep 17 00:00:00 2001 From: Robert Anderson <robert@noisysocks.com> Date: Wed, 23 Jan 2019 16:41:45 +1100 Subject: [PATCH 31/56] Reusable blocks: Improve UX for non-privileged users (#12378) Improves the UX of creating, editing, and deleting a reusable block when logged in as an author or contributor by disabling the _Add to Reusable Blocks_, _Edit_, and _Remove from Reusable Blocks_ buttons when necessary. This is accomplished under the hood by introducing the `canUser()` selector to `core-data` which allows callers to query whether the REST API supports performing a given action on a given resource, e.g. one can query whether the logged in user can create posts by running `wp.data.select( 'core' ).canUser( 'create', 'posts' )`. The existing `hasUploadPermissions()` selector is changed to use `canUser( 'create', 'media' )` under the hood. --- .../developers/data/data-core.md | 53 ++++++++++- lib/client-assets.php | 1 + lib/packages-dependencies.php | 1 + .../src/block/edit-panel/index.js | 3 +- packages/block-library/src/block/edit.js | 6 +- packages/core-data/package.json | 1 + packages/core-data/src/actions.js | 22 ++++- packages/core-data/src/reducer.js | 18 ++-- packages/core-data/src/resolvers.js | 59 +++++++++++- packages/core-data/src/selectors.js | 45 ++++++++- packages/core-data/src/test/actions.js | 12 ++- packages/core-data/src/test/reducer.js | 28 +++--- packages/core-data/src/test/resolvers.js | 95 ++++++++++++++++++- packages/core-data/src/test/selectors.js | 28 ++++++ .../reusable-block-convert-button.js | 40 ++++---- .../reusable-block-delete-button.js | 26 +++-- .../reusable-block-delete-button.js.snap | 1 + .../test/reusable-block-convert-button.js | 4 +- .../test/reusable-block-delete-button.js | 16 +++- .../src/components/media-placeholder/index.js | 6 +- .../src/components/media-upload/check.js | 9 +- 21 files changed, 400 insertions(+), 74 deletions(-) diff --git a/docs/designers-developers/developers/data/data-core.md b/docs/designers-developers/developers/data/data-core.md index 2a98c3bb5d3974..9b01fe325c295b 100644 --- a/docs/designers-developers/developers/data/data-core.md +++ b/docs/designers-developers/developers/data/data-core.md @@ -136,17 +136,50 @@ get back from the oEmbed preview API. Is the preview for the URL an oEmbed link fallback. -### hasUploadPermissions +### hasUploadPermissions (deprecated) -Return Upload Permissions. +Returns whether the current user can upload media. + +Calling this may trigger an OPTIONS request to the REST API via the +`canUser()` resolver. + +https://developer.wordpress.org/rest-api/reference/ + +*Deprecated* + +Deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of + `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`. *Parameters* - * state: State tree. + * state: Data state. *Returns* -Upload Permissions. +Whether or not the user can upload media. Defaults to `true` if the OPTIONS + request is being made. + +### canUser + +Returns whether the current user can perform the given action on the given +REST resource. + +Calling this may trigger an OPTIONS request to the REST API via the +`canUser()` resolver. + +https://developer.wordpress.org/rest-api/reference/ + +*Parameters* + + * state: Data state. + * action: Action to check. One of: 'create', 'read', 'update', 'delete'. + * resource: REST resource to check, e.g. 'media' or 'posts'. + * id: Optional ID of the rest resource to check. + +*Returns* + +Whether or not the user can perform the action, + or `undefined` if the OPTIONS request is still being made. ## Actions @@ -213,4 +246,14 @@ Returns an action object used in signalling that Upload permissions have been re *Parameters* - * hasUploadPermissions: Does the user have permission to upload files? \ No newline at end of file + * hasUploadPermissions: Does the user have permission to upload files? + +### receiveUserPermission + +Returns an action object used in signalling that the current user has +permission to perform an action on a REST resource. + +*Parameters* + + * key: A key that represents the action and REST resource. + * isAllowed: Whether or not the user can perform the action. \ No newline at end of file diff --git a/lib/client-assets.php b/lib/client-assets.php index 42624b3e1c2943..630a50434c72fa 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -1086,6 +1086,7 @@ function gutenberg_editor_scripts_and_styles( $hook ) { sprintf( '/wp/v2/types/%s?context=edit', $post_type ), sprintf( '/wp/v2/users/me?post_type=%s&context=edit', $post_type ), array( '/wp/v2/media', 'OPTIONS' ), + array( '/wp/v2/blocks', 'OPTIONS' ), ); /** diff --git a/lib/packages-dependencies.php b/lib/packages-dependencies.php index f1b785f15b011d..ef1b2bc22cdb90 100644 --- a/lib/packages-dependencies.php +++ b/lib/packages-dependencies.php @@ -84,6 +84,7 @@ 'lodash', 'wp-api-fetch', 'wp-data', + 'wp-deprecated', 'wp-url', ), 'wp-data' => array( diff --git a/packages/block-library/src/block/edit-panel/index.js b/packages/block-library/src/block/edit-panel/index.js index e91c76cc6bf52e..eb620a877b63a1 100644 --- a/packages/block-library/src/block/edit-panel/index.js +++ b/packages/block-library/src/block/edit-panel/index.js @@ -53,7 +53,7 @@ class ReusableBlockEditPanel extends Component { } render() { - const { isEditing, title, isSaving, onEdit, instanceId } = this.props; + const { isEditing, title, isSaving, isEditDisabled, onEdit, instanceId } = this.props; return ( <Fragment> @@ -66,6 +66,7 @@ class ReusableBlockEditPanel extends Component { ref={ this.editButton } isLarge className="reusable-block-edit-panel__button" + disabled={ isEditDisabled } onClick={ onEdit } > { __( 'Edit' ) } diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index d95b07aedb9150..62e4acf0640d15 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -97,7 +97,7 @@ class ReusableBlockEdit extends Component { } render() { - const { isSelected, reusableBlock, block, isFetching, isSaving } = this.props; + const { isSelected, reusableBlock, block, isFetching, isSaving, canUpdateBlock } = this.props; const { isEditing, title, changedAttributes } = this.state; if ( ! reusableBlock && isFetching ) { @@ -130,6 +130,7 @@ class ReusableBlockEdit extends Component { isEditing={ isEditing } title={ title !== null ? title : reusableBlock.title } isSaving={ isSaving && ! reusableBlock.isTemporary } + isEditDisabled={ ! canUpdateBlock } onEdit={ this.startEditing } onChangeTitle={ this.setTitle } onSave={ this.save } @@ -151,6 +152,8 @@ export default compose( [ __experimentalIsSavingReusableBlock: isSavingReusableBlock, getBlock, } = select( 'core/editor' ); + const { canUser } = select( 'core' ); + const { ref } = ownProps.attributes; const reusableBlock = getReusableBlock( ref ); @@ -159,6 +162,7 @@ export default compose( [ isFetching: isFetchingReusableBlock( ref ), isSaving: isSavingReusableBlock( ref ), block: reusableBlock ? getBlock( reusableBlock.clientId ) : null, + canUpdateBlock: !! reusableBlock && ! reusableBlock.isTemporary && !! canUser( 'update', 'blocks', ref ), }; } ), withDispatch( ( dispatch, ownProps ) => { diff --git a/packages/core-data/package.json b/packages/core-data/package.json index b28d5c2eb0c24f..388ab7b45e8f0a 100644 --- a/packages/core-data/package.json +++ b/packages/core-data/package.json @@ -24,6 +24,7 @@ "@babel/runtime": "^7.0.0", "@wordpress/api-fetch": "file:../api-fetch", "@wordpress/data": "file:../data", + "@wordpress/deprecated": "file:../deprecated", "@wordpress/url": "file:../url", "equivalent-key-map": "^0.2.2", "lodash": "^4.17.10", diff --git a/packages/core-data/src/actions.js b/packages/core-data/src/actions.js index ebbcfb7e761500..c15bd647b9fcd6 100644 --- a/packages/core-data/src/actions.js +++ b/packages/core-data/src/actions.js @@ -137,7 +137,25 @@ export function* saveEntityRecord( kind, name, record ) { */ export function receiveUploadPermissions( hasUploadPermissions ) { return { - type: 'RECEIVE_UPLOAD_PERMISSIONS', - hasUploadPermissions, + type: 'RECEIVE_USER_PERMISSION', + key: 'create/media', + isAllowed: hasUploadPermissions, + }; +} + +/** + * Returns an action object used in signalling that the current user has + * permission to perform an action on a REST resource. + * + * @param {string} key A key that represents the action and REST resource. + * @param {boolean} isAllowed Whether or not the user can perform the action. + * + * @return {Object} Action object. + */ +export function receiveUserPermission( key, isAllowed ) { + return { + type: 'RECEIVE_USER_PERMISSION', + key, + isAllowed, }; } diff --git a/packages/core-data/src/reducer.js b/packages/core-data/src/reducer.js index bb14a0283b7ca5..7785667822d68c 100644 --- a/packages/core-data/src/reducer.js +++ b/packages/core-data/src/reducer.js @@ -218,17 +218,21 @@ export function embedPreviews( state = {}, action ) { } /** - * Reducer managing Upload permissions. + * State which tracks whether the user can perform an action on a REST + * resource. * - * @param {Object} state Current state. - * @param {Object} action Dispatched action. + * @param {Object} state Current state. + * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ -export function hasUploadPermissions( state = true, action ) { +export function userPermissions( state = {}, action ) { switch ( action.type ) { - case 'RECEIVE_UPLOAD_PERMISSIONS': - return action.hasUploadPermissions; + case 'RECEIVE_USER_PERMISSION': + return { + ...state, + [ action.key ]: action.isAllowed, + }; } return state; @@ -241,5 +245,5 @@ export default combineReducers( { themeSupports, entities, embedPreviews, - hasUploadPermissions, + userPermissions, } ); diff --git a/packages/core-data/src/resolvers.js b/packages/core-data/src/resolvers.js index b8bd4ed2382854..009fe1b7d5b42d 100644 --- a/packages/core-data/src/resolvers.js +++ b/packages/core-data/src/resolvers.js @@ -1,12 +1,13 @@ /** * External dependencies */ -import { find, includes, get, hasIn } from 'lodash'; +import { find, includes, get, hasIn, compact } from 'lodash'; /** * WordPress dependencies */ import { addQueryArgs } from '@wordpress/url'; +import deprecated from '@wordpress/deprecated'; /** * Internal dependencies @@ -16,7 +17,7 @@ import { receiveEntityRecords, receiveThemeSupports, receiveEmbedPreview, - receiveUploadPermissions, + receiveUserPermission, } from './actions'; import { getKindEntities } from './entities'; import { apiFetch } from './controls'; @@ -101,9 +102,57 @@ export function* getEmbedPreview( url ) { /** * Requests Upload Permissions from the REST API. + * + * @deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of + * `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`. */ export function* hasUploadPermissions() { - const response = yield apiFetch( { path: '/wp/v2/media', method: 'OPTIONS', parse: false } ); + deprecated( "select( 'core' ).hasUploadPermissions()", { + alternative: "select( 'core' ).canUser( 'create', 'media' )", + } ); + yield* canUser( 'create', 'media' ); +} + +/** + * Checks whether the current user can perform the given action on the given + * REST resource. + * + * @param {string} action Action to check. One of: 'create', 'read', 'update', + * 'delete'. + * @param {string} resource REST resource to check, e.g. 'media' or 'posts'. + * @param {?string} id ID of the rest resource to check. + */ +export function* canUser( action, resource, id ) { + const methods = { + create: 'POST', + read: 'GET', + update: 'PUT', + delete: 'DELETE', + }; + + const method = methods[ action ]; + if ( ! method ) { + throw new Error( `'${ action }' is not a valid action.` ); + } + + const path = id ? `/wp/v2/${ resource }/${ id }` : `/wp/v2/${ resource }`; + + let response; + try { + response = yield apiFetch( { + path, + // Ideally this would always be an OPTIONS request, but unfortunately there's + // a bug in the REST API which causes the Allow header to not be sent on + // OPTIONS requests to /posts/:id routes. + // https://core.trac.wordpress.org/ticket/45753 + method: id ? 'GET' : 'OPTIONS', + parse: false, + } ); + } catch ( error ) { + // Do nothing if our OPTIONS request comes back with an API error (4xx or + // 5xx). The previously determined isAllowed value will remain in the store. + return; + } let allowHeader; if ( hasIn( response, [ 'headers', 'get' ] ) ) { @@ -116,5 +165,7 @@ export function* hasUploadPermissions() { allowHeader = get( response, [ 'headers', 'Allow' ], '' ); } - yield receiveUploadPermissions( includes( allowHeader, 'POST' ) ); + const key = compact( [ action, resource, id ] ).join( '/' ); + const isAllowed = includes( allowHeader, method ); + yield receiveUserPermission( key, isAllowed ); } diff --git a/packages/core-data/src/selectors.js b/packages/core-data/src/selectors.js index 95e9f867aa3c02..b9ed8b575e0863 100644 --- a/packages/core-data/src/selectors.js +++ b/packages/core-data/src/selectors.js @@ -2,12 +2,13 @@ * External dependencies */ import createSelector from 'rememo'; -import { map, find, get, filter } from 'lodash'; +import { map, find, get, filter, compact, defaultTo } from 'lodash'; /** * WordPress dependencies */ import { select } from '@wordpress/data'; +import deprecated from '@wordpress/deprecated'; /** * Internal dependencies @@ -171,12 +172,46 @@ export function isPreviewEmbedFallback( state, url ) { } /** - * Return Upload Permissions. + * Returns whether the current user can upload media. * - * @param {Object} state State tree. + * Calling this may trigger an OPTIONS request to the REST API via the + * `canUser()` resolver. * - * @return {boolean} Upload Permissions. + * https://developer.wordpress.org/rest-api/reference/ + * + * @deprecated since 5.0. Callers should use the more generic `canUser()` selector instead of + * `hasUploadPermissions()`, e.g. `canUser( 'create', 'media' )`. + * + * @param {Object} state Data state. + * + * @return {boolean} Whether or not the user can upload media. Defaults to `true` if the OPTIONS + * request is being made. */ export function hasUploadPermissions( state ) { - return state.hasUploadPermissions; + deprecated( "select( 'core' ).hasUploadPermissions()", { + alternative: "select( 'core' ).canUser( 'create', 'media' )", + } ); + return defaultTo( canUser( state, 'create', 'media' ), true ); +} + +/** + * Returns whether the current user can perform the given action on the given + * REST resource. + * + * Calling this may trigger an OPTIONS request to the REST API via the + * `canUser()` resolver. + * + * https://developer.wordpress.org/rest-api/reference/ + * + * @param {Object} state Data state. + * @param {string} action Action to check. One of: 'create', 'read', 'update', 'delete'. + * @param {string} resource REST resource to check, e.g. 'media' or 'posts'. + * @param {string=} id Optional ID of the rest resource to check. + * + * @return {boolean|undefined} Whether or not the user can perform the action, + * or `undefined` if the OPTIONS request is still being made. + */ +export function canUser( state, action, resource, id ) { + const key = compact( [ action, resource, id ] ).join( '/' ); + return get( state, [ 'userPermissions', key ] ); } diff --git a/packages/core-data/src/test/actions.js b/packages/core-data/src/test/actions.js index 86e7f50ed53c1e..85c94eeaa52246 100644 --- a/packages/core-data/src/test/actions.js +++ b/packages/core-data/src/test/actions.js @@ -1,7 +1,7 @@ /** * Internal dependencies */ -import { saveEntityRecord, receiveEntityRecords } from '../actions'; +import { saveEntityRecord, receiveEntityRecords, receiveUserPermission } from '../actions'; describe( 'saveEntityRecord', () => { it( 'triggers a POST request for a new record', async () => { @@ -58,3 +58,13 @@ describe( 'saveEntityRecord', () => { expect( received ).toEqual( receiveEntityRecords( 'root', 'postType', postType, undefined, true ) ); } ); } ); + +describe( 'receiveUserPermission', () => { + it( 'builds an action object', () => { + expect( receiveUserPermission( 'create/media', true ) ).toEqual( { + type: 'RECEIVE_USER_PERMISSION', + key: 'create/media', + isAllowed: true, + } ); + } ); +} ); diff --git a/packages/core-data/src/test/reducer.js b/packages/core-data/src/test/reducer.js index f6647becf07433..51bc4611ad7d98 100644 --- a/packages/core-data/src/test/reducer.js +++ b/packages/core-data/src/test/reducer.js @@ -7,7 +7,7 @@ import { filter } from 'lodash'; /** * Internal dependencies */ -import { terms, entities, embedPreviews, hasUploadPermissions } from '../reducer'; +import { terms, entities, embedPreviews, userPermissions } from '../reducer'; describe( 'terms()', () => { it( 'returns an empty object by default', () => { @@ -118,21 +118,25 @@ describe( 'embedPreviews()', () => { } ); } ); -describe( 'hasUploadPermissions()', () => { - it( 'returns true by default', () => { - const state = hasUploadPermissions( undefined, {} ); - - expect( state ).toEqual( true ); +describe( 'userPermissions()', () => { + it( 'defaults to an empty object', () => { + const state = userPermissions( undefined, {} ); + expect( state ).toEqual( {} ); } ); - it( 'returns with updated upload permissions value', () => { - const originalState = true; + it( 'updates state with whether an action is allowed', () => { + const original = deepFreeze( { + 'create/media': false, + } ); - const state = hasUploadPermissions( originalState, { - type: 'RECEIVE_UPLOAD_PERMISSIONS', - hasUploadPermissions: false, + const state = userPermissions( original, { + type: 'RECEIVE_USER_PERMISSION', + key: 'create/media', + isAllowed: true, } ); - expect( state ).toEqual( false ); + expect( state ).toEqual( { + 'create/media': true, + } ); } ); } ); diff --git a/packages/core-data/src/test/resolvers.js b/packages/core-data/src/test/resolvers.js index 8b008bc1cad685..325e4ce9c322a3 100644 --- a/packages/core-data/src/test/resolvers.js +++ b/packages/core-data/src/test/resolvers.js @@ -1,8 +1,9 @@ /** * Internal dependencies */ -import { getEntityRecord, getEntityRecords, getEmbedPreview } from '../resolvers'; -import { receiveEntityRecords, receiveEmbedPreview } from '../actions'; +import { getEntityRecord, getEntityRecords, getEmbedPreview, canUser } from '../resolvers'; +import { receiveEntityRecords, receiveEmbedPreview, receiveUserPermission } from '../actions'; +import { apiFetch } from '../controls'; describe( 'getEntityRecord', () => { const POST_TYPE = { slug: 'post' }; @@ -68,3 +69,93 @@ describe( 'getEmbedPreview', () => { expect( received ).toEqual( receiveEmbedPreview( UNEMBEDDABLE_URL, UNEMBEDDABLE_RESPONSE ) ); } ); } ); + +describe( 'canUser', () => { + it( 'does nothing when there is an API error', () => { + const generator = canUser( 'create', 'media' ); + + let received = generator.next(); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( apiFetch( { + path: '/wp/v2/media', + method: 'OPTIONS', + parse: false, + } ) ); + + received = generator.throw( { status: 404 } ); + expect( received.done ).toBe( true ); + expect( received.value ).toBeUndefined(); + } ); + + it( 'receives false when the user is not allowed to perform an action', () => { + const generator = canUser( 'create', 'media' ); + + let received = generator.next(); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( apiFetch( { + path: '/wp/v2/media', + method: 'OPTIONS', + parse: false, + } ) ); + + received = generator.next( { + headers: { + Allow: 'GET', + }, + } ); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( receiveUserPermission( 'create/media', false ) ); + + received = generator.next(); + expect( received.done ).toBe( true ); + expect( received.value ).toBeUndefined(); + } ); + + it( 'receives true when the user is allowed to perform an action', () => { + const generator = canUser( 'create', 'media' ); + + let received = generator.next(); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( apiFetch( { + path: '/wp/v2/media', + method: 'OPTIONS', + parse: false, + } ) ); + + received = generator.next( { + headers: { + Allow: 'POST, GET, PUT, DELETE', + }, + } ); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( receiveUserPermission( 'create/media', true ) ); + + received = generator.next(); + expect( received.done ).toBe( true ); + expect( received.value ).toBeUndefined(); + } ); + + it( 'receives true when the user is allowed to perform an action on a specific resource', () => { + const generator = canUser( 'update', 'blocks', 123 ); + + let received = generator.next(); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( apiFetch( { + path: '/wp/v2/blocks/123', + method: 'GET', + parse: false, + } ) ); + + received = generator.next( { + headers: { + Allow: 'POST, GET, PUT, DELETE', + }, + } ); + expect( received.done ).toBe( false ); + expect( received.value ).toEqual( receiveUserPermission( 'update/blocks/123', true ) ); + + received = generator.next(); + expect( received.done ).toBe( true ); + expect( received.value ).toBeUndefined(); + } ); +} ); diff --git a/packages/core-data/src/test/selectors.js b/packages/core-data/src/test/selectors.js index b982ada4f3a9d2..f2a2885e776628 100644 --- a/packages/core-data/src/test/selectors.js +++ b/packages/core-data/src/test/selectors.js @@ -11,6 +11,7 @@ import { getEntityRecords, getEmbedPreview, isPreviewEmbedFallback, + canUser, } from '../selectors'; describe( 'getEntityRecord', () => { @@ -117,3 +118,30 @@ describe( 'isPreviewEmbedFallback()', () => { expect( isPreviewEmbedFallback( state, 'http://example.com/' ) ).toEqual( true ); } ); } ); + +describe( 'canUser', () => { + it( 'returns undefined by default', () => { + const state = deepFreeze( { + userPermissions: {}, + } ); + expect( canUser( state, 'create', 'media' ) ).toBe( undefined ); + } ); + + it( 'returns whether an action can be performed', () => { + const state = deepFreeze( { + userPermissions: { + 'create/media': false, + }, + } ); + expect( canUser( state, 'create', 'media' ) ).toBe( false ); + } ); + + it( 'returns whether an action can be performed for a given resource', () => { + const state = deepFreeze( { + userPermissions: { + 'create/media/123': false, + }, + } ); + expect( canUser( state, 'create', 'media', 123 ) ).toBe( false ); + } ); +} ); diff --git a/packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js b/packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js index 6d39538aa5e5ab..2e528a01e7d911 100644 --- a/packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js +++ b/packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js @@ -15,7 +15,7 @@ import { compose } from '@wordpress/compose'; export function ReusableBlockConvertButton( { isVisible, - isStaticBlock, + isReusable, onConvertToStatic, onConvertToReusable, } ) { @@ -25,7 +25,7 @@ export function ReusableBlockConvertButton( { return ( <Fragment> - { isStaticBlock && ( + { ! isReusable && ( <MenuItem className="editor-block-settings-menu__control" icon="controls-repeat" @@ -34,7 +34,7 @@ export function ReusableBlockConvertButton( { { __( 'Add to Reusable Blocks' ) } </MenuItem> ) } - { ! isStaticBlock && ( + { isReusable && ( <MenuItem className="editor-block-settings-menu__control" icon="controls-repeat" @@ -54,32 +54,40 @@ export default compose( [ canInsertBlockType, __experimentalGetReusableBlock: getReusableBlock, } = select( 'core/editor' ); + const { canUser } = select( 'core' ); const blocks = getBlocksByClientId( clientIds ); - const isVisible = ( - // Hide 'Add to Reusable Blocks' when Reusable Blocks are disabled, i.e. when - // core/block is not in the allowed_block_types filter. + const isReusable = ( + blocks.length === 1 && + blocks[ 0 ] && + isReusableBlock( blocks[ 0 ] ) && + !! getReusableBlock( blocks[ 0 ].attributes.ref ) + ); + + // Show 'Convert to Regular Block' when selected block is a reusable block + const isVisible = isReusable || ( + // Hide 'Add to Reusable Blocks' when reusable blocks are disabled canInsertBlockType( 'core/block' ) && every( blocks, ( block ) => ( - // Guard against the case where a regular block has *just* been converted to a - // reusable block and doesn't yet exist in the editor store. + // Guard against the case where a regular block has *just* been converted !! block && - // Only show the option to covert to reusable blocks on valid blocks. + + // Hide 'Add to Reusable Blocks' on invalid blocks block.isValid && - // Make sure the block supports being converted into a reusable block (by default that is the case). + + // Hide 'Add to Reusable Blocks' when block doesn't support being made reusable hasBlockSupport( block.name, 'reusable', true ) - ) ) + ) ) && + + // Hide 'Add to Reusable Blocks' when current doesn't have permission to do that + !! canUser( 'create', 'blocks' ) ); return { + isReusable, isVisible, - isStaticBlock: isVisible && ( - blocks.length !== 1 || - ! isReusableBlock( blocks[ 0 ] ) || - ! getReusableBlock( blocks[ 0 ].attributes.ref ) - ), }; } ), withDispatch( ( dispatch, { clientIds, onToggle = noop } ) => { diff --git a/packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js b/packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js index 52f2ad08108f93..5a73912b36ee7a 100644 --- a/packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js +++ b/packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js @@ -12,8 +12,8 @@ import { __ } from '@wordpress/i18n'; import { isReusableBlock } from '@wordpress/blocks'; import { withSelect, withDispatch } from '@wordpress/data'; -export function ReusableBlockDeleteButton( { reusableBlock, onDelete } ) { - if ( ! reusableBlock ) { +export function ReusableBlockDeleteButton( { isVisible, isDisabled, onDelete } ) { + if ( ! isVisible ) { return null; } @@ -21,8 +21,8 @@ export function ReusableBlockDeleteButton( { reusableBlock, onDelete } ) { <MenuItem className="editor-block-settings-menu__control" icon="no" - disabled={ reusableBlock.isTemporary } - onClick={ () => onDelete( reusableBlock.id ) } + disabled={ isDisabled } + onClick={ () => onDelete() } > { __( 'Remove from Reusable Blocks' ) } </MenuItem> @@ -35,18 +35,27 @@ export default compose( [ getBlock, __experimentalGetReusableBlock: getReusableBlock, } = select( 'core/editor' ); + const { canUser } = select( 'core' ); + const block = getBlock( clientId ); + + const reusableBlock = block && isReusableBlock( block ) ? + getReusableBlock( block.attributes.ref ) : + null; + return { - reusableBlock: block && isReusableBlock( block ) ? getReusableBlock( block.attributes.ref ) : null, + isVisible: !! reusableBlock && !! canUser( 'delete', 'blocks', reusableBlock.id ), + isDisabled: reusableBlock && reusableBlock.isTemporary, }; } ), - withDispatch( ( dispatch, { onToggle = noop } ) => { + withDispatch( ( dispatch, { clientId, onToggle = noop }, { select } ) => { const { __experimentalDeleteReusableBlock: deleteReusableBlock, } = dispatch( 'core/editor' ); + const { getBlock } = select( 'core/editor' ); return { - onDelete( id ) { + onDelete() { // TODO: Make this a <Confirm /> component or similar // eslint-disable-next-line no-alert const hasConfirmed = window.confirm( __( @@ -55,7 +64,8 @@ export default compose( [ ) ); if ( hasConfirmed ) { - deleteReusableBlock( id ); + const block = getBlock( clientId ); + deleteReusableBlock( block.attributes.ref ); onToggle(); } }, diff --git a/packages/editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap b/packages/editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap index c31a0f8e9f9b46..23e876d36a9c6d 100644 --- a/packages/editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap +++ b/packages/editor/src/components/block-settings-menu/test/__snapshots__/reusable-block-delete-button.js.snap @@ -3,6 +3,7 @@ exports[`ReusableBlockDeleteButton matches the snapshot 1`] = ` <WithInstanceId(MenuItem) className="editor-block-settings-menu__control" + disabled={false} icon="no" onClick={[Function]} > diff --git a/packages/editor/src/components/block-settings-menu/test/reusable-block-convert-button.js b/packages/editor/src/components/block-settings-menu/test/reusable-block-convert-button.js index 1aabafc55ef925..c6fba313e31b34 100644 --- a/packages/editor/src/components/block-settings-menu/test/reusable-block-convert-button.js +++ b/packages/editor/src/components/block-settings-menu/test/reusable-block-convert-button.js @@ -27,7 +27,7 @@ describe( 'ReusableBlockConvertButton', () => { const wrapper = getShallowRenderOutput( <ReusableBlockConvertButton isVisible - isStaticBlock + isReusable={ false } onConvertToReusable={ onConvert } /> ); @@ -43,7 +43,7 @@ describe( 'ReusableBlockConvertButton', () => { const wrapper = getShallowRenderOutput( <ReusableBlockConvertButton isVisible - isStaticBlock={ false } + isReusable onConvertToStatic={ onConvert } /> ); diff --git a/packages/editor/src/components/block-settings-menu/test/reusable-block-delete-button.js b/packages/editor/src/components/block-settings-menu/test/reusable-block-delete-button.js index 9da36d7f24e601..39299becf29c24 100644 --- a/packages/editor/src/components/block-settings-menu/test/reusable-block-delete-button.js +++ b/packages/editor/src/components/block-settings-menu/test/reusable-block-delete-button.js @@ -16,11 +16,20 @@ describe( 'ReusableBlockDeleteButton', () => { return renderer.getRenderOutput(); } + it( 'should not render when isVisible is false', () => { + const wrapper = getShallowRenderOutput( + <ReusableBlockDeleteButton isVisible={ false } /> + ); + + expect( wrapper ).toBe( null ); + } ); + it( 'matches the snapshot', () => { const wrapper = getShallowRenderOutput( <ReusableBlockDeleteButton role="menuitem" - reusableBlock={ { id: 123 } } + isVisible + isDisabled={ false } onDelete={ noop } /> ); @@ -32,12 +41,13 @@ describe( 'ReusableBlockDeleteButton', () => { const onDelete = jest.fn(); const wrapper = getShallowRenderOutput( <ReusableBlockDeleteButton - reusableBlock={ { id: 123 } } + isVisible + isDisabled={ false } onDelete={ onDelete } /> ); wrapper.props.onClick(); - expect( onDelete ).toHaveBeenCalledWith( 123 ); + expect( onDelete ).toHaveBeenCalled(); } ); } ); diff --git a/packages/editor/src/components/media-placeholder/index.js b/packages/editor/src/components/media-placeholder/index.js index c1b64eb0d9a64a..11b80bcc58b0f6 100644 --- a/packages/editor/src/components/media-placeholder/index.js +++ b/packages/editor/src/components/media-placeholder/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import { every, get, noop, startsWith } from 'lodash'; +import { every, get, noop, startsWith, defaultTo } from 'lodash'; import classnames from 'classnames'; /** @@ -258,10 +258,10 @@ export class MediaPlaceholder extends Component { } const applyWithSelect = withSelect( ( select ) => { - const { hasUploadPermissions } = select( 'core' ); + const { canUser } = select( 'core' ); return { - hasUploadPermissions: hasUploadPermissions(), + hasUploadPermissions: defaultTo( canUser( 'create', 'media' ), true ), }; } ); diff --git a/packages/editor/src/components/media-upload/check.js b/packages/editor/src/components/media-upload/check.js index d72b48497e0afb..5dde4c69fa827c 100644 --- a/packages/editor/src/components/media-upload/check.js +++ b/packages/editor/src/components/media-upload/check.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import { defaultTo } from 'lodash'; + /** * WordPress dependencies */ @@ -8,9 +13,9 @@ export function MediaUploadCheck( { hasUploadPermissions, fallback = null, child } export default withSelect( ( select ) => { - const { hasUploadPermissions } = select( 'core' ); + const { canUser } = select( 'core' ); return { - hasUploadPermissions: hasUploadPermissions(), + hasUploadPermissions: defaultTo( canUser( 'create', 'media' ), true ), }; } )( MediaUploadCheck ); From b8b7bffbaf9193145167f8e080e4165d7bb2c452 Mon Sep 17 00:00:00 2001 From: Brent Swisher <brent@brentswisher.com> Date: Wed, 23 Jan 2019 02:41:12 -0500 Subject: [PATCH 32/56] Update the embed block to show no preview for smugmug (#12961) --- packages/block-library/src/embed/constants.js | 2 +- packages/block-library/src/embed/embed-preview.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/block-library/src/embed/constants.js b/packages/block-library/src/embed/constants.js index 19a988ce14008e..cf26c58f182d88 100644 --- a/packages/block-library/src/embed/constants.js +++ b/packages/block-library/src/embed/constants.js @@ -1,5 +1,5 @@ // These embeds do not work in sandboxes due to the iframe's security restrictions. -export const HOSTS_NO_PREVIEWS = [ 'facebook.com' ]; +export const HOSTS_NO_PREVIEWS = [ 'facebook.com', 'smugmug.com' ]; export const ASPECT_RATIOS = [ // Common video resolutions. diff --git a/packages/block-library/src/embed/embed-preview.js b/packages/block-library/src/embed/embed-preview.js index addc30e0cd341d..fc82b84a4d5118 100644 --- a/packages/block-library/src/embed/embed-preview.js +++ b/packages/block-library/src/embed/embed-preview.js @@ -28,10 +28,11 @@ const EmbedPreview = ( props ) => { const { scripts } = preview; const html = 'photo' === type ? getPhotoHtml( preview ) : preview.html; - const parsedUrl = parse( url ); - const cannotPreview = includes( HOSTS_NO_PREVIEWS, parsedUrl.host.replace( /^www\./, '' ) ); + const parsedHost = parse( url ).host.split( '.' ); + const parsedHostBaseUrl = parsedHost.splice( parsedHost.length - 2, parsedHost.length - 1 ).join( '.' ); + const cannotPreview = includes( HOSTS_NO_PREVIEWS, parsedHostBaseUrl ); // translators: %s: host providing embed content e.g: www.youtube.com - const iframeTitle = sprintf( __( 'Embedded content from %s' ), parsedUrl.host ); + const iframeTitle = sprintf( __( 'Embedded content from %s' ), parsedHostBaseUrl ); const sandboxClassnames = classnames( type, className, 'wp-block-embed__wrapper' ); const embedWrapper = 'wp-embed' === type ? ( From e117993b7f8f8ecf6f49ad171bc4d10121131c63 Mon Sep 17 00:00:00 2001 From: Riad Benguella <benguella@gmail.com> Date: Wed, 23 Jan 2019 08:48:04 +0100 Subject: [PATCH 33/56] Fix HTML preview for themes applying global margins (#13416) --- packages/block-library/src/html/edit.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/html/edit.js b/packages/block-library/src/html/edit.js index d9bbe4e07211f3..44aa79544415b5 100644 --- a/packages/block-library/src/html/edit.js +++ b/packages/block-library/src/html/edit.js @@ -20,7 +20,22 @@ class HTMLEdit extends Component { componentDidMount() { const { styles } = this.props; - this.setState( { styles: transformStyles( styles ) } ); + + // Default styles used to unset some of the styles + // that might be inherited from the editor style. + const defaultStyles = ` + html,body,:root { + margin: 0 !important; + padding: 0 !important; + overflow: visible !important; + min-height: auto !important; + } + `; + + this.setState( { styles: [ + defaultStyles, + ...transformStyles( styles ), + ] } ); } switchToPreview() { From a6f9625a63603589b33801fdc6ca2c8501ee7067 Mon Sep 17 00:00:00 2001 From: Tammie Lister <tammie@automattic.com> Date: Wed, 23 Jan 2019 07:59:57 +0000 Subject: [PATCH 34/56] Remove feedback form (#10705) This removes the Polldaddy feedback form leaving support just in the forums. This focuses ready for 5.0 release. --- gutenberg.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index dd6c91af48197a..794558c4dd70cc 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -93,12 +93,6 @@ function gutenberg_menu() { __( 'https://wordpress.org/support/plugin/gutenberg', 'gutenberg' ), ); - $submenu['gutenberg'][] = array( - __( 'Feedback', 'gutenberg' ), - 'edit_posts', - 'http://wordpressdotorg.polldaddy.com/s/gutenberg-support', - ); - $submenu['gutenberg'][] = array( __( 'Documentation', 'gutenberg' ), 'edit_posts', From 6c4a1d1063c918a164c09d2e0bbdc5c2fd737995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= <grzegorz@gziolo.pl> Date: Wed, 23 Jan 2019 09:22:33 +0100 Subject: [PATCH 35/56] Scripts: Add support for start and build scripts to the package (#12837) * Scripts: Add build and start scripts to wp-script * Introduce start and build scripts in scripts package * Use Webpack for builds in scripts package * Add documentation for start and build commands * Address feedback from review --- package-lock.json | 6540 +++++++++-------------------- package.json | 6 +- packages/scripts/CHANGELOG.md | 7 + packages/scripts/README.md | 37 +- packages/scripts/package.json | 4 +- packages/scripts/scripts/build.js | 35 + packages/scripts/scripts/start.js | 31 + 7 files changed, 2201 insertions(+), 4459 deletions(-) create mode 100644 packages/scripts/scripts/build.js create mode 100644 packages/scripts/scripts/start.js diff --git a/package-lock.json b/package-lock.json index ab56fd83b74884..66e4036ba60bb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2026,22 +2026,8 @@ "dev": true, "requires": { "any-observable": "^0.3.0" - }, - "dependencies": { - "any-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", - "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", - "dev": true - } } }, - "@sindresorhus/is": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", - "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", - "dev": true - }, "@tannin/compile": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@tannin/compile/-/compile-1.0.1.tgz", @@ -2804,7 +2790,9 @@ "read-pkg-up": "^1.0.1", "resolve-bin": "^0.4.0", "stylelint": "^9.10.1", - "stylelint-config-wordpress": "^13.1.0" + "stylelint-config-wordpress": "^13.1.0", + "webpack": "4.8.3", + "webpack-cli": "^3.1.2" } }, "@wordpress/shortcode": { @@ -3037,9 +3025,9 @@ } }, "any-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.2.0.tgz", - "integrity": "sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI=", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", + "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", "dev": true }, "anymatch": { @@ -3264,12 +3252,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "ast-types": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.5.tgz", - "integrity": "sha512-oJjo+5e7/vEc2FBK8gUalV0pba4L3VdBIs2EKhOLHLcOd2FgQIVQN9xb0eZ9IjEWyAL7vq6fGJxOvVvdCHNyMw==", - "dev": true - }, "ast-types-flow": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", @@ -3335,6 +3317,12 @@ "postcss-value-parser": "^3.3.1" }, "dependencies": { + "caniuse-lite": { + "version": "1.0.30000929", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000929.tgz", + "integrity": "sha512-n2w1gPQSsYyorSVYqPMqbSaz1w7o9ZC8VhOEGI9T5MfGDzp7sbopQxG6GaQmYsaq13Xfx/mkxJUWC1Dz3oZfzw==", + "dev": true + }, "postcss-value-parser": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", @@ -3567,156 +3555,6 @@ } } }, - "babel-helper-bindify-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz", - "integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-builder-binary-assignment-operator-visitor": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", - "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", - "dev": true, - "requires": { - "babel-helper-explode-assignable-expression": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-explode-assignable-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", - "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-explode-class": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz", - "integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=", - "dev": true, - "requires": { - "babel-helper-bindify-decorators": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", - "dev": true, - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-remap-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", - "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", - "dev": true, - "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, "babel-helpers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", @@ -3758,15 +3596,6 @@ "babel-runtime": "^6.22.0" } }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, "babel-plugin-istanbul": { "version": "4.1.6", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", @@ -3785,2206 +3614,1906 @@ "integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=", "dev": true }, - "babel-plugin-syntax-async-functions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", - "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", - "dev": true - }, - "babel-plugin-syntax-async-generators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", - "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", - "dev": true - }, - "babel-plugin-syntax-class-constructor-call": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", - "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=", - "dev": true - }, - "babel-plugin-syntax-class-properties": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", - "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", - "dev": true - }, - "babel-plugin-syntax-decorators": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", - "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", - "dev": true - }, - "babel-plugin-syntax-dynamic-import": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", - "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", - "dev": true - }, - "babel-plugin-syntax-exponentiation-operator": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", - "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", - "dev": true - }, - "babel-plugin-syntax-export-extensions": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", - "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=", - "dev": true - }, - "babel-plugin-syntax-flow": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", - "dev": true - }, "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", "dev": true }, - "babel-plugin-syntax-trailing-function-commas": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", - "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=", - "dev": true - }, - "babel-plugin-transform-async-generator-functions": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz", - "integrity": "sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-generators": "^6.5.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-async-to-generator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", - "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", - "dev": true, - "requires": { - "babel-helper-remap-async-to-generator": "^6.24.1", - "babel-plugin-syntax-async-functions": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-class-constructor-call": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz", - "integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=", - "dev": true, - "requires": { - "babel-plugin-syntax-class-constructor-call": "^6.18.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-class-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", - "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-plugin-syntax-class-properties": "^6.8.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-decorators": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz", - "integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=", + "babel-preset-jest": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz", + "integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=", "dev": true, "requires": { - "babel-helper-explode-class": "^6.24.1", - "babel-plugin-syntax-decorators": "^6.13.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-types": "^6.24.1" + "babel-plugin-jest-hoist": "^23.2.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0" } }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + }, + "dependencies": { + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } } }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } } }, - "babel-plugin-transform-es2015-block-scoping": { + "babel-template": { "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "dev": true, "requires": { "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", + "babylon": "^6.18.0", "lodash": "^4.17.4" } }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "dev": true, "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", + "babel-code-frame": "^6.26.0", "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + } } }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + } } }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", - "dev": true, - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "bail": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.3.tgz", + "integrity": "sha512-1X8CnjFVQ+a+KW36uBNMTU5s8+v5FzeqrP7hTG5aTb4aPreSbZJlhwPon9VKMuEVgV++JM+SQrALY3kr7eswdg==", + "dev": true }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", - "dev": true, - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } } }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", - "dev": true, - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, + "optional": true, "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" + "tweetnacl": "^0.14.3" } }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=", "dev": true, "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" + "lodash": "^4.17.4", + "platform": "^1.3.3" } }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "bfj": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", + "integrity": "sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==", "dev": true, "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" + "bluebird": "^3.5.1", + "check-types": "^7.3.0", + "hoopy": "^0.1.2", + "tryer": "^1.0.0" } }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", - "dev": true, - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } + "bindings": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", + "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=", + "dev": true }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "inherits": "~2.0.0" } }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "body": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", + "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", "dev": true, "requires": { - "babel-runtime": "^6.22.0" + "continuable-cache": "^0.3.1", + "error": "^7.0.0", + "raw-body": "~1.1.0", + "safe-json-parse": "~1.0.1" } }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", "dev": true, "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "http-errors": "~1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "~2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "~1.6.15" }, "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", "dev": true }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" + "ms": "2.0.0" } }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", "dev": true, "requires": { - "jsesc": "~0.5.0" + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + }, + "dependencies": { + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + } } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true } } }, - "babel-plugin-transform-exponentiation-operator": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", - "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", - "dev": true, - "requires": { - "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", - "babel-plugin-syntax-exponentiation-operator": "^6.8.0", - "babel-runtime": "^6.22.0" - } + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true }, - "babel-plugin-transform-export-extensions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz", - "integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=", + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "babel-plugin-syntax-export-extensions": "^6.8.0", - "babel-runtime": "^6.22.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "babel-plugin-transform-flow-strip-types": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, "requires": { - "babel-plugin-syntax-flow": "^6.18.0", - "babel-runtime": "^6.22.0" + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } } }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", - "dev": true, - "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" - } + "brcast": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brcast/-/brcast-2.0.2.tgz", + "integrity": "sha512-Tfn5JSE7hrUlFcOoaLzVvkbgIemIorMIyoMr3TgvszWW7jFt2C9PdeMLtysYD9RU0MmU17b69+XJG1eRY2OBRg==" }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-process-hrtime": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", + "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "dev": true + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", "dev": true, "requires": { - "regenerator-transform": "^0.10.0" + "resolve": "1.1.7" }, "dependencies": { - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "dev": true, - "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - } + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true } } }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "babel-preset-es2015": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", - "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", - "dev": true, - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.22.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-plugin-transform-es2015-object-super": "^6.24.1", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", - "babel-plugin-transform-regenerator": "^6.24.1" + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, - "babel-preset-jest": { - "version": "23.2.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz", - "integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=", + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^23.2.0", - "babel-plugin-syntax-object-rest-spread": "^6.13.0" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "babel-preset-stage-1": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz", - "integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=", + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { - "babel-plugin-transform-class-constructor-call": "^6.24.1", - "babel-plugin-transform-export-extensions": "^6.22.0", - "babel-preset-stage-2": "^6.24.1" + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" } }, - "babel-preset-stage-2": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz", - "integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=", + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "dev": true, "requires": { - "babel-plugin-syntax-dynamic-import": "^6.18.0", - "babel-plugin-transform-class-properties": "^6.24.1", - "babel-plugin-transform-decorators": "^6.24.1", - "babel-preset-stage-3": "^6.24.1" + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" } }, - "babel-preset-stage-3": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz", - "integrity": "sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=", + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "dev": true, "requires": { - "babel-plugin-syntax-trailing-function-commas": "^6.22.0", - "babel-plugin-transform-async-generator-functions": "^6.24.1", - "babel-plugin-transform-async-to-generator": "^6.24.1", - "babel-plugin-transform-exponentiation-operator": "^6.24.1", - "babel-plugin-transform-object-rest-spread": "^6.22.0" + "pako": "~1.0.5" } }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "browserslist": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", + "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", "dev": true, "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" + "caniuse-lite": "^1.0.30000929", + "electron-to-chromium": "^1.3.103", + "node-releases": "^1.1.3" }, "dependencies": { - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } + "caniuse-lite": { + "version": "1.0.30000929", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000929.tgz", + "integrity": "sha512-n2w1gPQSsYyorSVYqPMqbSaz1w7o9ZC8VhOEGI9T5MfGDzp7sbopQxG6GaQmYsaq13Xfx/mkxJUWC1Dz3oZfzw==", + "dev": true }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "electron-to-chromium": { + "version": "1.3.103", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.103.tgz", + "integrity": "sha512-tObPqGmY9X8MUM8i3MEimYmbnLLf05/QV5gPlkR8MQ3Uj8G8B2govE1U4cQcBYtv3ymck9Y8cIOu4waoiykMZQ==", + "dev": true + }, + "node-releases": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.3.tgz", + "integrity": "sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ==", "dev": true, "requires": { - "ms": "2.0.0" + "semver": "^5.3.0" } } } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } + "node-int64": "^0.4.0" } }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" } }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "buffer-from": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", + "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "byte-size": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-4.0.4.tgz", + "integrity": "sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw==", + "dev": true + }, + "bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", + "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", + "dev": true + }, + "cacache": { + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", + "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "dev": true, "requires": { - "ms": "2.0.0" + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true } } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - }, - "dependencies": { - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true - } + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "bail": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.3.tgz", - "integrity": "sha512-1X8CnjFVQ+a+KW36uBNMTU5s8+v5FzeqrP7hTG5aTb4aPreSbZJlhwPon9VKMuEVgV++JM+SQrALY3kr7eswdg==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", "dev": true }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "callsites": "^0.2.0" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true } } }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", "dev": true, - "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" } }, - "benchmark": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", - "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=", + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", "dev": true, "requires": { - "lodash": "^4.17.4", - "platform": "^1.3.3" + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + }, + "dependencies": { + "browserslist": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.1.tgz", + "integrity": "sha512-QqiiIWchEIkney3wY53/huI7ZErouNAdvOkjorUALAwRcu3tEwOV3Sh6He0DnP38mz1JjBpCBb50jQBmaYuHPw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000865", + "electron-to-chromium": "^1.3.52", + "node-releases": "^1.0.0-alpha.10" + } + } } }, - "bfj": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.1.tgz", - "integrity": "sha512-+GUNvzHR4nRyGybQc2WpNJL4MJazMuvf92ueIyA0bIkPRwhhQu3IfZQ2PSoVPpCBJfmoSdOxu5rnotfFLlvYRQ==", + "caniuse-db": { + "version": "1.0.30000871", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000871.tgz", + "integrity": "sha1-8ZlcH+MYkmSadgWVeoDJJRhCPU0=", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30000865", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz", + "integrity": "sha512-vs79o1mOSKRGv/1pSkp4EXgl4ZviWeYReXw60XfacPU64uQWZwJT6vZNmxRF9O+6zu71sJwMxLK5JXxbzuVrLw==", + "dev": true + }, + "capture-exit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", + "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", "dev": true, "requires": { - "bluebird": "^3.5.1", - "check-types": "^7.3.0", - "hoopy": "^0.1.2", - "tryer": "^1.0.0" + "rsvp": "^3.3.3" } }, - "big.js": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", - "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "ccount": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.3.tgz", + "integrity": "sha512-Jt9tIBkRc9POUof7QA/VwWd+58fKkEEfI+/t1/eOlxKM7ZhrczNzMFefge7Ai+39y1pR/pP6cI19guHy3FSLmw==", "dev": true }, - "binaryextensions": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.1.tgz", - "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "character-entities": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.2.tgz", + "integrity": "sha512-sMoHX6/nBiy3KKfC78dnEalnpn0Az0oSNvqUWYTtYrhRI5iUIYsROU48G+E+kMFQzqXaJ8kHJZ85n7y6/PHgwQ==", "dev": true }, - "bindings": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", - "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=", + "character-entities-html4": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.2.tgz", + "integrity": "sha512-sIrXwyna2+5b0eB9W149izTPJk/KkJTg6mEzDGibwBUkyH1SbDa+nf515Ppdi3MaH35lW0JFJDWeq9Luzes1Iw==", "dev": true }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "character-entities-legacy": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.2.tgz", + "integrity": "sha512-9NB2VbXtXYWdXzqrvAHykE/f0QJxzaKIpZ5QzNZrrgQ7Iyxr2vnfS8fCBNVW9nUEZE0lo57nxKRqnzY/dKrwlA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz", + "integrity": "sha512-7I/xceXfKyUJmSAn/jw8ve/9DyOP7XxufNYLI9Px7CmsKgEUaZLUTax6nZxGQtaoiZCjpu6cHPj20xC/vqRReQ==", + "dev": true + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "check-node-version": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-3.2.0.tgz", + "integrity": "sha512-mJu4dADRf+NUeOyGgFTXaLtjyyffD3Eej2RA9IEk1CdHmoVurErLD++e/Ps6uKfsB273ky+0Z9NlOiuplxuNdw==", "dev": true, "requires": { - "inherits": "~2.0.0" + "chalk": "^2.3.0", + "map-values": "^1.0.1", + "minimist": "^1.2.0", + "object-filter": "^1.0.2", + "object.assign": "^4.0.4", + "run-parallel": "^1.1.4", + "semver": "^5.0.3" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } } }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "check-types": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz", + "integrity": "sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==", "dev": true }, - "body": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz", - "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=", + "cheerio": { + "version": "1.0.0-rc.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", + "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", "dev": true, "requires": { - "continuable-cache": "^0.3.1", - "error": "^7.0.0", - "raw-body": "~1.1.0", - "safe-json-parse": "~1.0.1" + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash": "^4.15.0", + "parse5": "^3.0.1" } }, - "body-parser": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", - "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "chokidar": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", + "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", "dev": true, "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.1", - "http-errors": "~1.6.2", - "iconv-lite": "0.4.19", - "on-finished": "~2.3.0", - "qs": "6.5.1", - "raw-body": "2.3.2", - "type-is": "~1.6.15" + "anymatch": "^2.0.0", + "async-each": "^1.0.0", + "braces": "^2.3.0", + "fsevents": "^1.2.2", + "glob-parent": "^3.1.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "lodash.debounce": "^4.0.8", + "normalize-path": "^2.1.1", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0", + "upath": "^1.0.5" }, "dependencies": { - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { - "ms": "2.0.0" + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } } }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", - "dev": true - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - }, - "dependencies": { - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", - "dev": true - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "dev": true, - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": ">= 1.3.1 < 2" - } - } + "is-extglob": "^2.1.1" } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", - "dev": true } } }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "chownr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "chrome-trace-event": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", + "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", + "dev": true + }, + "ci-info": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", + "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" } }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "circular-json-es6": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/circular-json-es6/-/circular-json-es6-2.0.2.tgz", + "integrity": "sha512-ODYONMMNb3p658Zv+Pp+/XPa5s6q7afhz3Tzyvo+VRh9WIrJ64J76ZC4GQxnlye/NesTn09jvOiuE8+xxfpwhQ==", + "dev": true + }, + "clap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", + "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", "dev": true, "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" + "chalk": "^1.1.3" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { - "is-extendable": "^0.1.0" + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true } } }, - "brcast": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brcast/-/brcast-2.0.2.tgz", - "integrity": "sha512-Tfn5JSE7hrUlFcOoaLzVvkbgIemIorMIyoMr3TgvszWW7jFt2C9PdeMLtysYD9RU0MmU17b69+XJG1eRY2OBRg==" - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-process-hrtime": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", - "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", - "dev": true - }, - "browser-resolve": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", - "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "resolve": "1.1.7" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } } } }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "classnames": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz", + "integrity": "sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0=" + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "restore-cursor": "^2.0.0" } }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "slice-ansi": "0.0.4", + "string-width": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } } }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, + "clipboard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.1.tgz", + "integrity": "sha512-7yhQBmtN+uYZmfRjjVjKa0dZdWuabzpSKGtyQZN+9C8xlC788SSJjOHWh7tzurfwTqTD5UDYAhIv5fRJg3sHjQ==", "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" } }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "requires": { - "pako": "~1.0.5" - } + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true }, - "browserslist": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", - "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", + "clone-deep": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000929", - "electron-to-chromium": "^1.3.103", - "node-releases": "^1.1.3" + "for-own": "^1.0.0", + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.0", + "shallow-clone": "^1.0.0" }, "dependencies": { - "electron-to-chromium": { - "version": "1.3.103", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.103.tgz", - "integrity": "sha512-tObPqGmY9X8MUM8i3MEimYmbnLLf05/QV5gPlkR8MQ3Uj8G8B2govE1U4cQcBYtv3ymck9Y8cIOu4waoiykMZQ==", - "dev": true - }, - "node-releases": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.3.tgz", - "integrity": "sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ==", + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "dev": true, "requires": { - "semver": "^5.3.0" + "for-in": "^1.0.1" } } } }, - "bser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", - "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "clone-regexp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz", + "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==", "dev": true, "requires": { - "node-int64": "^0.4.0" + "is-regexp": "^1.0.0", + "is-supported-regexp-flag": "^1.0.0" } }, - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "cmd-shim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", + "integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=", "dev": true, "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" } }, - "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", - "dev": true + "coa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.1.tgz", + "integrity": "sha512-5wfTTO8E2/ja4jFSxePXlG5nRu5bBtL/r1HCIpJW/lzT6yDtKl0u0Z4o/Vpz32IpKmBn7HerheEZQgA9N2DarQ==", + "dev": true, + "requires": { + "q": "^1.1.2" + } }, - "byline": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", - "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", - "dev": true + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, - "byte-size": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-4.0.4.tgz", - "integrity": "sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw==", + "collapse-white-space": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.4.tgz", + "integrity": "sha512-YfQ1tAUZm561vpYD+5eyWN8+UsceQbSrqqlc/6zDY2gtAE+uZLSdkkovhnGpmCThsvKBFakq4EdY/FF93E8XIw==", "dev": true }, - "bytes": { + "collection-visit": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz", - "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g=", - "dev": true - }, - "cacache": { - "version": "10.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz", - "integrity": "sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.1", - "mississippi": "^2.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", - "ssri": "^5.2.4", - "unique-filename": "^1.1.0", - "y18n": "^4.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - } + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "color": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", + "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "clone": "^1.0.2", + "color-convert": "^1.3.0", + "color-string": "^0.3.0" } }, - "cacheable-request": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", - "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", "dev": true, "requires": { - "clone-response": "1.0.2", - "get-stream": "3.0.0", - "http-cache-semantics": "3.8.1", - "keyv": "3.0.0", - "lowercase-keys": "1.0.0", - "normalize-url": "2.0.1", - "responselike": "1.0.2" - }, - "dependencies": { - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", - "dev": true - } + "color-name": "1.1.1" } }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", "dev": true }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, + "color-string": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", + "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", + "dev": true, "requires": { - "callsites": "^0.2.0" - }, - "dependencies": { - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - } + "color-name": "^1.0.0" } }, - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "colormin": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", + "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", "dev": true, "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" + "color": "^0.11.0", + "css-color-names": "0.0.4", + "has": "^1.0.1" } }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "colors": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", + "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=", + "dev": true + }, + "columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", "dev": true, "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" }, "dependencies": { - "browserslist": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.1.tgz", - "integrity": "sha512-QqiiIWchEIkney3wY53/huI7ZErouNAdvOkjorUALAwRcu3tEwOV3Sh6He0DnP38mz1JjBpCBb50jQBmaYuHPw==", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000865", - "electron-to-chromium": "^1.3.52", - "node-releases": "^1.0.0-alpha.10" + "ansi-regex": "^2.0.0" } } } }, - "caniuse-db": { - "version": "1.0.30000871", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000871.tgz", - "integrity": "sha1-8ZlcH+MYkmSadgWVeoDJJRhCPU0=", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30000929", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000929.tgz", - "integrity": "sha512-n2w1gPQSsYyorSVYqPMqbSaz1w7o9ZC8VhOEGI9T5MfGDzp7sbopQxG6GaQmYsaq13Xfx/mkxJUWC1Dz3oZfzw==", - "dev": true - }, - "capture-exit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", - "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", - "dev": true, - "requires": { - "rsvp": "^3.3.3" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "ccount": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.3.tgz", - "integrity": "sha512-Jt9tIBkRc9POUof7QA/VwWd+58fKkEEfI+/t1/eOlxKM7ZhrczNzMFefge7Ai+39y1pR/pP6cI19guHy3FSLmw==", - "dev": true - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "delayed-stream": "~1.0.0" } }, - "character-entities": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.2.tgz", - "integrity": "sha512-sMoHX6/nBiy3KKfC78dnEalnpn0Az0oSNvqUWYTtYrhRI5iUIYsROU48G+E+kMFQzqXaJ8kHJZ85n7y6/PHgwQ==", - "dev": true - }, - "character-entities-html4": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.2.tgz", - "integrity": "sha512-sIrXwyna2+5b0eB9W149izTPJk/KkJTg6mEzDGibwBUkyH1SbDa+nf515Ppdi3MaH35lW0JFJDWeq9Luzes1Iw==", - "dev": true - }, - "character-entities-legacy": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.2.tgz", - "integrity": "sha512-9NB2VbXtXYWdXzqrvAHykE/f0QJxzaKIpZ5QzNZrrgQ7Iyxr2vnfS8fCBNVW9nUEZE0lo57nxKRqnzY/dKrwlA==", - "dev": true - }, - "character-reference-invalid": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz", - "integrity": "sha512-7I/xceXfKyUJmSAn/jw8ve/9DyOP7XxufNYLI9Px7CmsKgEUaZLUTax6nZxGQtaoiZCjpu6cHPj20xC/vqRReQ==", + "commander": { + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", "dev": true }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, - "check-node-version": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-3.1.1.tgz", - "integrity": "sha512-52fHDe/0pbidY3InI33Beyb/oarySfLANlXxLGBl9lLVrLIW88XWIwu4jGJrQ1imuWzX5ukNGWXUyCgmgVUD8A==", + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", "dev": true, "requires": { - "chalk": "^2.3.0", - "map-values": "^1.0.1", - "minimist": "^1.2.0", - "object-filter": "^1.0.2", - "object.assign": "^4.0.4", - "run-parallel": "^1.1.4", - "semver": "^5.0.3" + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } } } }, - "check-types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz", - "integrity": "sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==", + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true }, - "cheerio": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", - "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", + "computed-style": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/computed-style/-/computed-style-0.1.4.tgz", + "integrity": "sha1-fzRP2FhLLkJb7cpKGvwOMAuwXXQ=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash": "^4.15.0", - "parse5": "^3.0.1" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, - "chokidar": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", - "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", + "concurrently": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz", + "integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.2.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "lodash.debounce": "^4.0.8", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.5" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "chalk": "0.5.1", + "commander": "2.6.0", + "date-fns": "^1.23.0", + "lodash": "^4.5.1", + "rx": "2.3.24", + "spawn-command": "^0.0.2-1", + "supports-color": "^3.2.3", + "tree-kill": "^1.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", + "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", + "dev": true + }, + "ansi-styles": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", + "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", + "dev": true + }, + "chalk": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", + "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", "dev": true, "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" + "ansi-styles": "^1.1.0", + "escape-string-regexp": "^1.0.0", + "has-ansi": "^0.1.0", + "strip-ansi": "^0.3.0", + "supports-color": "^0.2.0" }, "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } + "supports-color": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", + "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", + "dev": true } } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "commander": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", + "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", "dev": true }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "has-ansi": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", + "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "ansi-regex": "^0.2.0" } - } - } - }, - "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", - "dev": true - }, - "chrome-trace-event": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz", - "integrity": "sha512-sjndyZHrrWiu4RY7AkHgjn80GfAM2ZSzUkZLV/Js59Ldmh6JDThf0SUmOHU53rFu2rVxxfCzJ30Ukcfch3Gb/A==", - "dev": true - }, - "ci-info": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.3.tgz", - "integrity": "sha512-SK/846h/Rcy8q9Z9CAwGBLfCJ6EkjJWdpelWDufQpqVDYq2Wnnv8zlSO6AMQap02jvhVruKKpEtQOufo3pFhLg==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, - "circular-json-es6": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/circular-json-es6/-/circular-json-es6-2.0.2.tgz", - "integrity": "sha512-ODYONMMNb3p658Zv+Pp+/XPa5s6q7afhz3Tzyvo+VRh9WIrJ64J76ZC4GQxnlye/NesTn09jvOiuE8+xxfpwhQ==", - "dev": true - }, - "clap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clap/-/clap-1.2.3.tgz", - "integrity": "sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==", - "dev": true, - "requires": { - "chalk": "^1.1.3" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "strip-ansi": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", + "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-regex": "^0.2.1" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "has-flag": "^1.0.0" } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true } } }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "config-chain": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", + "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } + "ini": "^1.3.4", + "proto-list": "~1.2.1" } }, - "classnames": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz", - "integrity": "sha1-+zgB1FNGdknvNgPH1hoCvRKb3m0=" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "dev": true, "requires": { - "restore-cursor": "^2.0.0" + "date-now": "^0.1.4" } }, - "cli-spinners": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", - "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "consolidated-events": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/consolidated-events/-/consolidated-events-2.0.2.tgz", + "integrity": "sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ==" + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", + "dev": true + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, - "cli-table": { + "continuable-cache": { "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", + "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", + "dev": true + }, + "conventional-changelog-angular": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.2.tgz", + "integrity": "sha512-yx7m7lVrXmt4nKWQgWZqxSALEiAKZhOAcbxdUaU9575mB0CzXVbgrgpfSnSP7OqWDUTYGD0YVJ0MSRdyOPgAwA==", "dev": true, "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } + "compare-func": "^1.3.1", + "q": "^1.5.1" } }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "conventional-changelog-core": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.1.5.tgz", + "integrity": "sha512-iwqAotS4zk0wA4S84YY1JCUG7X3LxaRjJxuUo6GI4dZuIy243j5nOg/Ora35ExT4DOiw5dQbMMQvw2SUjh6moQ==", "dev": true, "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, + "conventional-changelog-writer": "^4.0.2", + "conventional-commits-parser": "^3.0.1", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "2.0.0", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^2.0.2", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "through2": "^2.0.0" + }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true } } }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "clipboard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.1.tgz", - "integrity": "sha512-7yhQBmtN+uYZmfRjjVjKa0dZdWuabzpSKGtyQZN+9C8xlC788SSJjOHWh7tzurfwTqTD5UDYAhIv5fRJg3sHjQ==", - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "conventional-changelog-preset-loader": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.2.tgz", + "integrity": "sha512-pBY+qnUoJPXAXXqVGwQaVmcye05xi6z231QM98wHWamGAmu/ghkBprQAwmF5bdmyobdVxiLhPY3PrCfSeUNzRQ==", "dev": true }, - "clone-deep": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", - "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", + "conventional-changelog-writer": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.2.tgz", + "integrity": "sha512-d8/FQY/fix2xXEBUhOo8u3DCbyEw3UOQgYHxLsPDw+wHUDma/GQGAGsGtoH876WyNs32fViHmTOUrgRKVLvBug==", "dev": true, "requires": { - "for-own": "^1.0.0", - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.0", - "shallow-clone": "^1.0.0" + "compare-func": "^1.3.1", + "conventional-commits-filter": "^2.0.1", + "dateformat": "^3.0.0", + "handlebars": "^4.0.2", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "semver": "^5.5.0", + "split": "^1.0.0", + "through2": "^2.0.0" }, "dependencies": { - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "for-in": "^1.0.1" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true } } }, - "clone-regexp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz", - "integrity": "sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==", - "dev": true, - "requires": { - "is-regexp": "^1.0.0", - "is-supported-regexp-flag": "^1.0.0" - } - }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", - "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "conventional-commits-filter": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz", + "integrity": "sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A==", "dev": true, "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" + "is-subset": "^0.1.1", + "modify-values": "^1.0.0" } }, - "cmd-shim": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", - "integrity": "sha1-b8vamUg6j9FdfTChlspp1oii79s=", + "conventional-commits-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz", + "integrity": "sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "mkdirp": "~0.5.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "coa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.1.tgz", - "integrity": "sha512-5wfTTO8E2/ja4jFSxePXlG5nRu5bBtL/r1HCIpJW/lzT6yDtKl0u0Z4o/Vpz32IpKmBn7HerheEZQgA9N2DarQ==", - "dev": true, - "requires": { - "q": "^1.1.2" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "collapse-white-space": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.4.tgz", - "integrity": "sha512-YfQ1tAUZm561vpYD+5eyWN8+UsceQbSrqqlc/6zDY2gtAE+uZLSdkkovhnGpmCThsvKBFakq4EdY/FF93E8XIw==", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz", - "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", - "dev": true, - "requires": { - "clone": "^1.0.2", - "color-convert": "^1.3.0", - "color-string": "^0.3.0" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "color-string": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz", - "integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=", - "dev": true, - "requires": { - "color-name": "^1.0.0" - } - }, - "colormin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz", - "integrity": "sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=", - "dev": true, - "requires": { - "color": "^0.11.0", - "css-color-names": "0.0.4", - "has": "^1.0.1" - } - }, - "colors": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz", - "integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=", - "dev": true - }, - "columnify": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", - "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", - "dev": true, - "requires": { - "strip-ansi": "^3.0.0", - "wcwidth": "^1.0.0" + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.0", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0", + "trim-off-newlines": "^1.0.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true } } }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", - "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "compare-func": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", - "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "conventional-recommended-bump": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-4.0.4.tgz", + "integrity": "sha512-9mY5Yoblq+ZMqJpBzgS+RpSq+SUfP2miOR3H/NR9drGf08WCrY9B6HAGJZEm6+ThsVP917VHAahSOjM6k1vhPg==", "dev": true, "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^3.0.0" + "concat-stream": "^1.6.0", + "conventional-changelog-preset-loader": "^2.0.2", + "conventional-commits-filter": "^2.0.1", + "conventional-commits-parser": "^3.0.1", + "git-raw-commits": "2.0.0", + "git-semver-tags": "^2.0.2", + "meow": "^4.0.0", + "q": "^1.5.1" }, "dependencies": { - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { - "is-obj": "^1.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } - } - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, - "computed-style": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/computed-style/-/computed-style-0.1.4.tgz", - "integrity": "sha1-fzRP2FhLLkJb7cpKGvwOMAuwXXQ=" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "concurrently": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-3.5.0.tgz", - "integrity": "sha1-jPG3cHppFqeKT/W3e7BN7FSzebI=", - "dev": true, - "requires": { - "chalk": "0.5.1", - "commander": "2.6.0", - "date-fns": "^1.23.0", - "lodash": "^4.5.1", - "rx": "2.3.24", - "spawn-command": "^0.0.2-1", - "supports-color": "^3.2.3", - "tree-kill": "^1.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", - "integrity": "sha1-DY6UaWej2BQ/k+JOKYUl/BsiNfk=", - "dev": true - }, - "ansi-styles": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.1.0.tgz", - "integrity": "sha1-6uy/Zs1waIJ2Cy9GkVgrj1XXp94=", - "dev": true - }, - "chalk": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", - "integrity": "sha1-Zjs6ZItotV0EaQ1JFnqoN4WPIXQ=", - "dev": true, - "requires": { - "ansi-styles": "^1.1.0", - "escape-string-regexp": "^1.0.0", - "has-ansi": "^0.1.0", - "strip-ansi": "^0.3.0", - "supports-color": "^0.2.0" - }, - "dependencies": { - "supports-color": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-0.2.0.tgz", - "integrity": "sha1-2S3iaU6z9nMjlz1649i1W0wiGQo=", - "dev": true - } - } - }, - "commander": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz", - "integrity": "sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0=", - "dev": true }, - "has-ansi": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", - "integrity": "sha1-hPJlqujA5qiKEtcCKJS3VoiUxi4=", + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", "dev": true, "requires": { - "ansi-regex": "^0.2.0" + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" } }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "strip-ansi": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", - "integrity": "sha1-JfSOoiynkYfzF0pNuHWTR7sSYiA=", - "dev": true, - "requires": { - "ansi-regex": "^0.2.1" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - } - } - }, - "config-chain": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", - "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", - "dev": true, - "requires": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "consolidated-events": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/consolidated-events/-/consolidated-events-2.0.2.tgz", - "integrity": "sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ==" - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", - "dev": true - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "continuable-cache": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz", - "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8=", - "dev": true - }, - "conventional-changelog-angular": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.2.tgz", - "integrity": "sha512-yx7m7lVrXmt4nKWQgWZqxSALEiAKZhOAcbxdUaU9575mB0CzXVbgrgpfSnSP7OqWDUTYGD0YVJ0MSRdyOPgAwA==", - "dev": true, - "requires": { - "compare-func": "^1.3.1", - "q": "^1.5.1" - } - }, - "conventional-changelog-core": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.1.5.tgz", - "integrity": "sha512-iwqAotS4zk0wA4S84YY1JCUG7X3LxaRjJxuUo6GI4dZuIy243j5nOg/Ora35ExT4DOiw5dQbMMQvw2SUjh6moQ==", - "dev": true, - "requires": { - "conventional-changelog-writer": "^4.0.2", - "conventional-commits-parser": "^3.0.1", - "dateformat": "^3.0.0", - "get-pkg-repo": "^1.0.0", - "git-raw-commits": "2.0.0", - "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^2.0.2", - "lodash": "^4.2.1", - "normalize-package-data": "^2.3.5", - "q": "^1.5.1", - "read-pkg": "^3.0.0", - "read-pkg-up": "^3.0.0", - "through2": "^2.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -6030,73 +5559,87 @@ } } }, - "conventional-changelog-preset-loader": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.2.tgz", - "integrity": "sha512-pBY+qnUoJPXAXXqVGwQaVmcye05xi6z231QM98wHWamGAmu/ghkBprQAwmF5bdmyobdVxiLhPY3PrCfSeUNzRQ==", + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", "dev": true }, - "conventional-changelog-writer": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.2.tgz", - "integrity": "sha512-d8/FQY/fix2xXEBUhOo8u3DCbyEw3UOQgYHxLsPDw+wHUDma/GQGAGsGtoH876WyNs32fViHmTOUrgRKVLvBug==", + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { - "compare-func": "^1.3.1", - "conventional-commits-filter": "^2.0.1", - "dateformat": "^3.0.0", - "handlebars": "^4.0.2", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "semver": "^5.5.0", - "split": "^1.0.0", - "through2": "^2.0.0" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-webpack-plugin": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz", + "integrity": "sha512-zmC33E8FFSq3AbflTvqvPvBo621H36Afsxlui91d+QyZxPIuXghfnTsa1CuqiAaCPgJoSUWfTFbKJnadZpKEbQ==", + "dev": true, + "requires": { + "cacache": "^10.0.4", + "find-cache-dir": "^1.0.0", + "globby": "^7.1.1", + "is-glob": "^4.0.0", + "loader-utils": "^1.1.0", + "minimatch": "^3.0.4", + "p-limit": "^1.0.0", + "serialize-javascript": "^1.4.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", "dev": true, "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" + "array-union": "^1.0.1", + "dir-glob": "^2.0.0", + "glob": "^7.1.2", + "ignore": "^3.3.5", + "pify": "^3.0.0", + "slash": "^1.0.0" } }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "parse-json": { + "is-glob": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "is-extglob": "^2.1.1" } }, "pify": { @@ -6104,96 +5647,32 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true } } }, - "conventional-commits-filter": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz", - "integrity": "sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A==", - "dev": true, - "requires": { - "is-subset": "^0.1.1", - "modify-values": "^1.0.0" - } + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", + "dev": true }, - "conventional-commits-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz", - "integrity": "sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg==", + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.5.tgz", + "integrity": "sha512-94j37OtvxS5w7qr7Ta6dt67tWdnOxigBVN4VnSxNXFez9o18PGQ0D33SchKP17r9LAcWVTYV72G6vDayAUBFIg==", "dev": true, "requires": { - "JSONStream": "^1.0.4", - "is-text-path": "^1.0.0", - "lodash": "^4.2.1", - "meow": "^4.0.0", - "split2": "^2.0.0", - "through2": "^2.0.0", - "trim-off-newlines": "^1.0.0" + "is-directory": "^0.3.1", + "js-yaml": "^3.9.0", + "parse-json": "^4.0.0" }, "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", @@ -6203,268 +5682,13 @@ "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true } } }, - "conventional-recommended-bump": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-4.0.4.tgz", - "integrity": "sha512-9mY5Yoblq+ZMqJpBzgS+RpSq+SUfP2miOR3H/NR9drGf08WCrY9B6HAGJZEm6+ThsVP917VHAahSOjM6k1vhPg==", - "dev": true, - "requires": { - "concat-stream": "^1.6.0", - "conventional-changelog-preset-loader": "^2.0.2", - "conventional-commits-filter": "^2.0.1", - "conventional-commits-parser": "^3.0.1", - "git-raw-commits": "2.0.0", - "git-semver-tags": "^2.0.2", - "meow": "^4.0.0", - "q": "^1.5.1" - }, - "dependencies": { - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "meow": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist": "^1.1.3", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } - }, - "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", - "dev": true - }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "copy-concurrently": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", - "dev": true, - "requires": { - "aproba": "^1.1.1", - "fs-write-stream-atomic": "^1.0.8", - "iferr": "^0.1.5", - "mkdirp": "^0.5.1", - "rimraf": "^2.5.4", - "run-queue": "^1.0.0" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-webpack-plugin": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz", - "integrity": "sha512-zmC33E8FFSq3AbflTvqvPvBo621H36Afsxlui91d+QyZxPIuXghfnTsa1CuqiAaCPgJoSUWfTFbKJnadZpKEbQ==", - "dev": true, - "requires": { - "cacache": "^10.0.4", - "find-cache-dir": "^1.0.0", - "globby": "^7.1.1", - "is-glob": "^4.0.0", - "loader-utils": "^1.1.0", - "minimatch": "^3.0.4", - "p-limit": "^1.0.0", - "serialize-javascript": "^1.4.0" - }, - "dependencies": { - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "core-js": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", - "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cosmiconfig": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.5.tgz", - "integrity": "sha512-94j37OtvxS5w7qr7Ta6dt67tWdnOxigBVN4VnSxNXFez9o18PGQ0D33SchKP17r9LAcWVTYV72G6vDayAUBFIg==", - "dev": true, - "requires": { - "is-directory": "^0.3.1", - "js-yaml": "^3.9.0", - "parse-json": "^4.0.0" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - } - } - }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "dev": true, "requires": { "bn.js": "^4.1.0", @@ -6948,15 +6172,6 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", - "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -6972,12 +6187,6 @@ "lodash.isequal": "^3.0" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, "deep-freeze": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", @@ -7123,12 +6332,6 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", "dev": true }, - "detect-conflict": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/detect-conflict/-/detect-conflict-1.0.1.tgz", - "integrity": "sha1-CIZXpmqWHAUBnbfEIwiDsca0F24=", - "dev": true - }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -7278,12 +6481,6 @@ "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, "duplexify": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.0.tgz", @@ -7306,12 +6503,6 @@ "jsbn": "~0.1.0" } }, - "editions": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", - "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", - "dev": true - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -7403,12 +6594,6 @@ "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", "dev": true }, - "envinfo": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-4.4.2.tgz", - "integrity": "sha512-5rfRs+m+6pwoKRCFqpsA5+qsLngFms1aWPrxfKbrObCzQaPc3M3yPloZx+BL9UE3dK58cxw36XVQbFRSCCfGSQ==", - "dev": true - }, "enzyme": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.7.0.tgz", @@ -7913,12 +7098,6 @@ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", "dev": true }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -8014,15 +7193,6 @@ } } }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, "expect": { "version": "23.6.0", "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz", @@ -8706,15 +7876,6 @@ } } }, - "first-chunk-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", - "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", - "dev": true, - "requires": { - "readable-stream": "^2.0.2" - } - }, "flat-cache": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", @@ -8739,12 +7900,6 @@ "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", "dev": true }, - "flow-parser": { - "version": "0.76.0", - "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.76.0.tgz", - "integrity": "sha512-p+K8OKiMlq8AIZH8KTydHEGUUd71AqfCL+zTJNsdHtQmX3i3eaeIysF83Ad6Oo7OQcHCj3vocb/EHYiEyq+ZBg==", - "dev": true - }, "flush-write-stream": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz", @@ -9509,9 +8664,9 @@ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-own-enumerable-property-symbols": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz", - "integrity": "sha512-TtY/sbOemiMKPRUDDanGCSgBYe7Mf0vbRsWnBZ+9yghpZ1MvcpSpuZFjHdEeY/LZjZy0vdLjS77L6HosisFiug==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz", + "integrity": "sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==", "dev": true }, "get-pkg-repo": { @@ -9650,55 +8805,6 @@ "safe-buffer": "^5.1.1" } }, - "gh-got": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gh-got/-/gh-got-6.0.0.tgz", - "integrity": "sha512-F/mS+fsWQMo1zfgG9MD8KWvTWPPzzhuVwY++fhQ5Ggd+0P+CAMHtzMZhNxG+TqGfHDChJKsbh6otfMGqO2AKBw==", - "dev": true, - "requires": { - "got": "^7.0.0", - "is-plain-obj": "^1.1.0" - }, - "dependencies": { - "got": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", - "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", - "dev": true, - "requires": { - "decompress-response": "^3.2.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-plain-obj": "^1.1.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "p-cancelable": "^0.3.0", - "p-timeout": "^1.1.1", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "url-parse-lax": "^1.0.0", - "url-to-options": "^1.0.1" - } - }, - "p-cancelable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", - "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", - "dev": true - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - } - } - }, "git-raw-commits": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", @@ -9901,15 +9007,6 @@ "ini": "^1.3.2" } }, - "github-username": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/github-username/-/github-username-4.1.0.tgz", - "integrity": "sha1-y+KABBiDIG2kISrp5LXxacML9Bc=", - "dev": true, - "requires": { - "gh-got": "^6.0.0" - } - }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -9924,37 +9021,10 @@ "path-is-absolute": "^1.0.0" } }, - "glob-all": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-all/-/glob-all-3.1.0.tgz", - "integrity": "sha1-iRPd+17hrHgSZWJBsD1SF8ZLAqs=", - "dev": true, - "requires": { - "glob": "^7.0.5", - "yargs": "~1.2.6" - }, - "dependencies": { - "minimist": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", - "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", - "dev": true - }, - "yargs": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz", - "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", - "dev": true, - "requires": { - "minimist": "^0.1.0" - } - } - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { "glob-parent": "^2.0.0", @@ -9985,29 +9055,11 @@ "is-symbol": "^1.0.1" } }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } + "global-modules-path": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.1.tgz", + "integrity": "sha512-y+shkf4InI7mPRHSo2b/k6ix6+NLDtyccYv86whhxrSGX9wjPX1VMITmrDbE1eh7zkzhiWtW2sHklJYoQ62Cxg==", + "dev": true }, "globals": { "version": "11.7.0", @@ -10077,15 +9129,6 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "dev": true }, - "grouped-queue": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-0.3.3.tgz", - "integrity": "sha1-wWfSpTGcWg4JZO9qJbfC34mWyFw=", - "dev": true, - "requires": { - "lodash": "^4.17.2" - } - }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -10180,38 +9223,17 @@ } } }, - "has-color": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz", - "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", - "dev": true, - "requires": { - "has-symbol-support-x": "^1.4.1" - } - }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -10605,16 +9627,6 @@ "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", "dev": true }, - "into-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", - "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", - "dev": true, - "requires": { - "from2": "^2.1.1", - "p-is-promise": "^1.1.0" - } - }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -10909,29 +9921,6 @@ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", - "dev": true - }, - "is-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-0.2.0.tgz", - "integrity": "sha1-s2ExHYPG5dcmyr9eJQsCNxBvWuI=", - "dev": true, - "requires": { - "symbol-observable": "^0.2.2" - }, - "dependencies": { - "symbol-observable": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-0.2.4.tgz", - "integrity": "sha1-lag9smGG1q9+ehjb2XYKL4bQj0A=", - "dev": true - } - } - }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", @@ -11019,21 +10008,6 @@ "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-scoped": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-1.0.0.tgz", - "integrity": "sha1-RJypgpnnEwOCViieyytUDcQ3yzA=", - "dev": true, - "requires": { - "scoped-regex": "^1.0.0" - } - }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -11121,12 +10095,6 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, - "isbinaryfile": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz", - "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -11290,27 +10258,6 @@ "handlebars": "^4.0.3" } }, - "istextorbinary": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", - "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", - "dev": true, - "requires": { - "binaryextensions": "2", - "editions": "^1.3.3", - "textextensions": "2" - } - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, "jest": { "version": "23.6.0", "resolved": "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz", @@ -12966,167 +11913,6 @@ "dev": true, "optional": true }, - "jscodeshift": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.5.1.tgz", - "integrity": "sha512-sRMollbhbmSDrR79JMAnhEjyZJlQQVozeeY9A6/KNuV26DNcuB3mGSCWXp0hks9dcwRNOELbNOiwraZaXXRk5Q==", - "dev": true, - "requires": { - "babel-plugin-transform-flow-strip-types": "^6.8.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-stage-1": "^6.5.0", - "babel-register": "^6.9.0", - "babylon": "^7.0.0-beta.47", - "colors": "^1.1.2", - "flow-parser": "^0.*", - "lodash": "^4.13.1", - "micromatch": "^2.3.7", - "neo-async": "^2.5.0", - "node-dir": "0.1.8", - "nomnom": "^1.8.1", - "recast": "^0.15.0", - "temp": "^0.8.1", - "write-file-atomic": "^1.2.0" - }, - "dependencies": { - "ansi-styles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", - "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", - "dev": true - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "babylon": { - "version": "7.0.0-beta.47", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.47.tgz", - "integrity": "sha512-+rq2cr4GDhtToEzKFD6KZZMDBXhjFAr9JjPw9pAppZACeEWqNM294j+NdBzkSHYXwzzBmVjZ3nEVJlOhbR2gOQ==", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "chalk": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", - "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", - "dev": true, - "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" - } - }, - "colors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.0.tgz", - "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - }, - "nomnom": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", - "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", - "dev": true, - "requires": { - "chalk": "~0.4.0", - "underscore": "~1.6.0" - } - }, - "strip-ansi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", - "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", - "dev": true - }, - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" - } - } - } - }, "jsdom": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", @@ -13205,12 +11991,6 @@ "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", "dev": true }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -13247,571 +12027,196 @@ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jsx-ast-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", - "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", - "dev": true, - "requires": { - "array-includes": "^3.0.3" - } - }, - "keyv": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", - "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", - "dev": true, - "requires": { - "json-buffer": "3.0.0" - } - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "kleur": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", - "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==", - "dev": true - }, - "known-css-properties": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz", - "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==", - "dev": true - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "leb": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/leb/-/leb-0.3.0.tgz", - "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", - "dev": true - }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "dev": true - }, - "lerna": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.4.3.tgz", - "integrity": "sha512-tWq1LvpHqkyB+FaJCmkEweivr88yShDMmauofPVdh0M5gU1cVucszYnIgWafulKYu2LMQ3IfUMUU5Pp3+MvADQ==", - "dev": true, - "requires": { - "@lerna/add": "^3.4.1", - "@lerna/bootstrap": "^3.4.1", - "@lerna/changed": "^3.4.1", - "@lerna/clean": "^3.3.2", - "@lerna/cli": "^3.2.0", - "@lerna/create": "^3.4.1", - "@lerna/diff": "^3.3.0", - "@lerna/exec": "^3.3.2", - "@lerna/import": "^3.3.1", - "@lerna/init": "^3.3.0", - "@lerna/link": "^3.3.0", - "@lerna/list": "^3.3.2", - "@lerna/publish": "^3.4.3", - "@lerna/run": "^3.3.2", - "@lerna/version": "^3.4.1", - "import-local": "^1.0.0", - "npmlog": "^4.1.2" - } - }, - "leven": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", - "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "libnpmaccess": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.0.tgz", - "integrity": "sha512-SiE4AZAzMpD7pmmXHfgD7rof8QIQGoKaeyAS8exgx2CKA6tzRTbRljq1xM4Tgj8/tIg+KBJPJWkR0ifqKT3irQ==", - "dev": true, - "requires": { - "aproba": "^2.0.0", - "get-stream": "^4.0.0", - "npm-package-arg": "^6.1.0", - "npm-registry-fetch": "^3.8.0" - }, - "dependencies": { - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "line-height": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/line-height/-/line-height-0.3.1.tgz", - "integrity": "sha1-SxIF7d4YKHKl76PI9iCzGHqcVMk=", - "requires": { - "computed-style": "~0.1.3" - } - }, - "lint-staged": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-7.3.0.tgz", - "integrity": "sha512-AXk40M9DAiPi7f4tdJggwuKIViUplYtVj1os1MVEteW7qOkU50EOehayCfO9TsoGK24o/EsWb41yrEgfJDDjCw==", - "dev": true, - "requires": { - "chalk": "^2.3.1", - "commander": "^2.14.1", - "cosmiconfig": "^5.0.2", - "debug": "^3.1.0", - "dedent": "^0.7.0", - "execa": "^0.9.0", - "find-parent-dir": "^0.3.0", - "is-glob": "^4.0.0", - "is-windows": "^1.0.2", - "jest-validate": "^23.5.0", - "listr": "^0.14.1", - "lodash": "^4.17.5", - "log-symbols": "^2.2.0", - "micromatch": "^3.1.8", - "npm-which": "^3.0.1", - "p-map": "^1.1.1", - "path-is-inside": "^1.0.2", - "pify": "^3.0.0", - "please-upgrade-node": "^3.0.2", - "staged-git-files": "1.1.1", - "string-argv": "^0.0.2", - "stringify-object": "^3.2.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "execa": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz", - "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "dev": true, - "requires": { - "symbol-observable": "^1.1.0" - } - }, - "listr": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", - "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", - "dev": true, - "requires": { - "@samverschueren/stream-to-observable": "^0.3.0", - "is-observable": "^1.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.5.0", - "listr-verbose-renderer": "^0.5.0", - "p-map": "^2.0.0", - "rxjs": "^6.3.3" - }, - "dependencies": { - "p-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz", - "integrity": "sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w==", - "dev": true - } - } - }, - "listr-update-renderer": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", - "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^2.3.0", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - } - } - }, - "listr-verbose-renderer": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", - "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "cli-cursor": "^2.1.0", - "date-fns": "^1.27.2", - "figures": "^2.0.0" - }, - "dependencies": { - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - } - } - }, - "log-update": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", - "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "cli-cursor": "^2.0.0", - "wrap-ansi": "^3.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "rxjs": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", - "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "wrap-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - } + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" } }, - "listr": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.13.0.tgz", - "integrity": "sha1-ILsLowuuZg7oTMBQPfS+PVYjiH0=", + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-observable": "^0.2.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.4.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.4.2", - "stream-to-observable": "^0.2.0", - "strip-ansi": "^3.0.1" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true, + "requires": { + "array-includes": "^3.0.3" + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "kleur": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", + "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leb": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/leb/-/leb-0.3.0.tgz", + "integrity": "sha1-Mr7p+tFoMo1q6oUi2DP0GA7tHaM=", + "dev": true + }, + "left-pad": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", + "dev": true + }, + "lerna": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.4.3.tgz", + "integrity": "sha512-tWq1LvpHqkyB+FaJCmkEweivr88yShDMmauofPVdh0M5gU1cVucszYnIgWafulKYu2LMQ3IfUMUU5Pp3+MvADQ==", + "dev": true, + "requires": { + "@lerna/add": "^3.4.1", + "@lerna/bootstrap": "^3.4.1", + "@lerna/changed": "^3.4.1", + "@lerna/clean": "^3.3.2", + "@lerna/cli": "^3.2.0", + "@lerna/create": "^3.4.1", + "@lerna/diff": "^3.3.0", + "@lerna/exec": "^3.3.2", + "@lerna/import": "^3.3.1", + "@lerna/init": "^3.3.0", + "@lerna/link": "^3.3.0", + "@lerna/list": "^3.3.2", + "@lerna/publish": "^3.4.3", + "@lerna/run": "^3.3.2", + "@lerna/version": "^3.4.1", + "import-local": "^1.0.0", + "npmlog": "^4.1.2" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "libnpmaccess": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.0.tgz", + "integrity": "sha512-SiE4AZAzMpD7pmmXHfgD7rof8QIQGoKaeyAS8exgx2CKA6tzRTbRljq1xM4Tgj8/tIg+KBJPJWkR0ifqKT3irQ==", + "dev": true, + "requires": { + "aproba": "^2.0.0", + "get-stream": "^4.0.0", + "npm-package-arg": "^6.1.0", + "npm-registry-fetch": "^3.8.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { - "chalk": "^1.0.0" + "pump": "^3.0.0" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "wrap-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", - "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "^3.0.0" - } - } + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } } } }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", - "dev": true + "line-height": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/line-height/-/line-height-0.3.1.tgz", + "integrity": "sha1-SxIF7d4YKHKl76PI9iCzGHqcVMk=", + "requires": { + "computed-style": "~0.1.3" + } }, - "listr-update-renderer": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", - "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", + "lint-staged": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-7.3.0.tgz", + "integrity": "sha512-AXk40M9DAiPi7f4tdJggwuKIViUplYtVj1os1MVEteW7qOkU50EOehayCfO9TsoGK24o/EsWb41yrEgfJDDjCw==", "dev": true, "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" + "chalk": "^2.3.1", + "commander": "^2.14.1", + "cosmiconfig": "^5.0.2", + "debug": "^3.1.0", + "dedent": "^0.7.0", + "execa": "^0.9.0", + "find-parent-dir": "^0.3.0", + "is-glob": "^4.0.0", + "is-windows": "^1.0.2", + "jest-validate": "^23.5.0", + "listr": "^0.14.1", + "lodash": "^4.17.5", + "log-symbols": "^2.2.0", + "micromatch": "^3.1.8", + "npm-which": "^3.0.1", + "p-map": "^1.1.1", + "path-is-inside": "^1.0.2", + "pify": "^3.0.0", + "please-upgrade-node": "^3.0.2", + "staged-git-files": "1.1.1", + "string-argv": "^0.0.2", + "stringify-object": "^3.2.2" }, "dependencies": { "ansi-regex": { @@ -13826,17 +12231,19 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "execa": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz", + "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, "figures": { @@ -13849,104 +12256,135 @@ "object-assign": "^4.1.0" } }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "dev": true, "requires": { - "chalk": "^1.0.0" + "is-extglob": "^2.1.1" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "is-observable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", + "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "symbol-observable": "^1.1.0" } }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "listr": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", + "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "@samverschueren/stream-to-observable": "^0.3.0", + "is-observable": "^1.1.0", + "is-promise": "^2.1.0", + "is-stream": "^1.1.0", + "listr-silent-renderer": "^1.1.1", + "listr-update-renderer": "^0.5.0", + "listr-verbose-renderer": "^0.5.0", + "p-map": "^2.0.0", + "rxjs": "^6.3.3" + }, + "dependencies": { + "p-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz", + "integrity": "sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w==", + "dev": true + } } }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "listr-update-renderer": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", + "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", "dev": true, "requires": { - "restore-cursor": "^1.0.1" + "chalk": "^1.1.3", + "cli-truncate": "^0.2.1", + "elegant-spinner": "^1.0.1", + "figures": "^1.7.0", + "indent-string": "^3.0.0", + "log-symbols": "^1.0.2", + "log-update": "^2.3.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + } } }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "listr-verbose-renderer": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", + "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", "dev": true, "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "chalk": "^2.4.1", + "cli-cursor": "^2.1.0", + "date-fns": "^1.27.2", + "figures": "^2.0.0" + }, + "dependencies": { + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + } } }, - "onetime": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "log-update": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-2.3.0.tgz", + "integrity": "sha1-iDKP19HOeTiykoN0bwsbwSayRwg=", "dev": true, "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "ansi-escapes": "^3.0.0", + "cli-cursor": "^2.0.0", + "wrap-ansi": "^3.0.1" } }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -13961,9 +12399,42 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true + }, + "wrap-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-3.0.1.tgz", + "integrity": "sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo=", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } } } }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", + "dev": true + }, "livereload-js": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.3.0.tgz", @@ -14176,49 +12647,6 @@ "chalk": "^2.0.1" } }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - } - } - }, "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", @@ -14255,12 +12683,6 @@ "signal-exit": "^3.0.0" } }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", @@ -14484,99 +12906,15 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "dev": true - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "mem-fs": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-1.1.3.tgz", - "integrity": "sha1-uK6NLj/Lb10/kWXBLUVRoGXZicw=", - "dev": true, - "requires": { - "through2": "^2.0.0", - "vinyl": "^1.1.0", - "vinyl-file": "^2.0.0" - } + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true }, - "mem-fs-editor": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-4.0.3.tgz", - "integrity": "sha512-tgWmwI/+6vwu6POan82dTjxEpwAoaj0NAFnghtVo/FcLK2/7IhPUtFUUYlwou4MOY6OtjTUJtwpfH1h+eSUziw==", - "dev": true, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "requires": { - "commondir": "^1.0.1", - "deep-extend": "^0.6.0", - "ejs": "^2.5.9", - "glob": "^7.0.3", - "globby": "^7.1.1", - "isbinaryfile": "^3.0.2", - "mkdirp": "^0.5.0", - "multimatch": "^2.0.0", - "rimraf": "^2.2.8", - "through2": "^2.0.0", - "vinyl": "^2.0.1" - }, - "dependencies": { - "clone": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", - "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - } + "mimic-fn": "^1.0.0" } }, "memize": { @@ -14831,12 +13169,6 @@ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true - }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -15097,12 +13429,6 @@ "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, - "node-dir": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.8.tgz", - "integrity": "sha1-VfuN62mQcHB/tn+RpGDwRIKUx30=", - "dev": true - }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", @@ -15523,25 +13849,6 @@ "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", "dev": true }, - "normalize-url": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", - "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", - "dev": true, - "requires": { - "prepend-http": "^2.0.0", - "query-string": "^5.0.1", - "sort-keys": "^2.0.0" - }, - "dependencies": { - "prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", - "dev": true - } - } - }, "npm-bundled": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", @@ -15925,85 +14232,6 @@ "wordwrap": "~1.0.0" } }, - "ora": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", - "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -16042,27 +14270,12 @@ "os-tmpdir": "^1.0.0" } }, - "p-cancelable": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", - "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", - "dev": true - }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", "dev": true }, - "p-each-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", - "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", - "dev": true, - "requires": { - "p-reduce": "^1.0.0" - } - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -16074,12 +14287,6 @@ "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", "dev": true }, - "p-lazy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-lazy/-/p-lazy-1.0.0.tgz", - "integrity": "sha1-7FPIAvLuOsKPFmzILQsrAt4nqDU=", - "dev": true - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -16123,15 +14330,6 @@ "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -18285,18 +16483,6 @@ "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", "dev": true }, - "prettier": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.13.7.tgz", - "integrity": "sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w==", - "dev": true - }, - "pretty-bytes": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz", - "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=", - "dev": true - }, "pretty-format": { "version": "23.6.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", @@ -18528,17 +16714,6 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, - "query-string": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", - "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", - "dev": true, - "requires": { - "decode-uri-component": "^0.2.0", - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" - } - }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -18901,24 +17076,6 @@ "mute-stream": "~0.0.4" } }, - "read-chunk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", - "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", - "dev": true, - "requires": { - "pify": "^3.0.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, "read-cmd-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz", @@ -19057,41 +17214,6 @@ "util.promisify": "^1.0.0" } }, - "recast": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.15.2.tgz", - "integrity": "sha512-L4f/GqxjlEJ5IZ+tdll/l+6dVi2ylysWbkgFJbMuldD6Jklgfv6zJnCpuAZDfjwHhfcd/De0dDKelsTEPQ29qA==", - "dev": true, - "requires": { - "ast-types": "0.11.5", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, "redent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", @@ -19331,12 +17453,6 @@ "is-finite": "^1.0.0" } }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, "request": { "version": "2.87.0", "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", @@ -19463,16 +17579,6 @@ "resolve-from": "^3.0.0" } }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", @@ -19485,15 +17591,6 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, - "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", - "dev": true, - "requires": { - "lowercase-keys": "^1.0.0" - } - }, "restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", @@ -19662,20 +17759,12 @@ } }, "rxjs": { - "version": "5.5.11", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", - "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", "dev": true, "requires": { - "symbol-observable": "1.0.1" - }, - "dependencies": { - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - } + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -19911,12 +18000,6 @@ } } }, - "scoped-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-1.0.0.tgz", - "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", - "dev": true - }, "scss-tokenizer": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz", @@ -20116,17 +18199,6 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, - "shelljs": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz", - "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", @@ -20645,15 +18717,6 @@ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, - "stream-to-observable": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz", - "integrity": "sha1-WdbqOT2HwsDdrBCqDVYbxrpvDhA=", - "dev": true, - "requires": { - "any-observable": "^0.2.0" - } - }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -20724,12 +18787,12 @@ } }, "stringify-object": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.2.2.tgz", - "integrity": "sha512-O696NF21oLiDy8PhpWu8AEqoZHw++QW6mUv0UvKZe8gWSdSvMXkiLufK7OmnP27Dro4GU5kb9U7JIO0mBuCRQg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", "dev": true, "requires": { - "get-own-enumerable-property-symbols": "^2.0.1", + "get-own-enumerable-property-symbols": "^3.0.0", "is-obj": "^1.0.1", "is-regexp": "^1.0.0" } @@ -20751,16 +18814,6 @@ "is-utf8": "^0.2.0" } }, - "strip-bom-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", - "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", - "dev": true, - "requires": { - "first-chunk-stream": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -21075,6 +19128,12 @@ "is-extglob": "^2.1.1" } }, + "known-css-properties": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz", + "integrity": "sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==", + "dev": true + }, "merge2": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", @@ -21372,31 +19431,13 @@ }, "tar": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "dev": true, - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" - } - }, - "temp": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz", - "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=", - "dev": true, - "requires": { - "os-tmpdir": "^1.0.0", - "rimraf": "~2.2.6" - }, - "dependencies": { - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true - } + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", + "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" } }, "temp-dir": { @@ -21461,12 +19502,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "textextensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.2.0.tgz", - "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==", - "dev": true - }, "throat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", @@ -21489,12 +19524,6 @@ "xtend": "~4.0.1" } }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", @@ -22112,12 +20141,6 @@ } } }, - "untildify": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", - "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==", - "dev": true - }, "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", @@ -22155,21 +20178,6 @@ } } }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.1" - } - }, - "url-to-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", - "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", - "dev": true - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -22212,12 +20220,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, - "v8-compile-cache": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-1.1.2.tgz", - "integrity": "sha512-ejdrifsIydN1XDH7EuR2hn8ZrkRKUYF7tUcBjBy/lhrCvs2K+zRlbW9UHc0IQ9RsYFZJFqJrieoIHfkCa0DBRA==", - "dev": true - }, "validate-npm-package-license": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", @@ -22307,31 +20309,6 @@ "unist-util-stringify-position": "^1.1.1" } }, - "vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - }, - "vinyl-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-2.0.0.tgz", - "integrity": "sha1-p+v1/779obfRjRQPyweyI++2dRo=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.3.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0", - "strip-bom-stream": "^2.0.0", - "vinyl": "^1.1.0" - } - }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", @@ -22509,15 +20486,15 @@ }, "dependencies": { "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", + "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.1" + "uri-js": "^4.2.2" } }, "fast-deep-equal": { @@ -22534,382 +20511,234 @@ } } }, - "webpack-addons": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/webpack-addons/-/webpack-addons-1.1.5.tgz", - "integrity": "sha512-MGO0nVniCLFAQz1qv22zM02QPjcpAoJdy7ED0i3Zy7SY1IecgXCm460ib7H/Wq7e9oL5VL6S2BxaObxwIcag0g==", + "webpack-bundle-analyzer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.2.tgz", + "integrity": "sha512-cZG4wSQtKrSpk5RJ33dxiaAyo8bP0V+JvycAyIDFEiDIhw4LHhhVKhn40YT1w6TR9E4scHA00LnIoBtTA13Mow==", "dev": true, "requires": { - "jscodeshift": "^0.4.0" + "acorn": "^5.7.3", + "bfj": "^6.1.1", + "chalk": "^2.4.1", + "commander": "^2.18.0", + "ejs": "^2.6.1", + "express": "^4.16.3", + "filesize": "^3.6.1", + "gzip-size": "^5.0.0", + "lodash": "^4.17.10", + "mkdirp": "^0.5.1", + "opener": "^1.5.1", + "ws": "^6.0.0" }, "dependencies": { - "ansi-styles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz", - "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=", - "dev": true - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "ast-types": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz", - "integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", "dev": true }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "chalk": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", - "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", - "dev": true, - "requires": { - "ansi-styles": "~1.0.0", - "has-color": "~0.1.0", - "strip-ansi": "~0.1.0" - } - }, - "colors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.0.tgz", - "integrity": "sha512-EDpX3a7wHMWFA7PUHWPHNWqOxIIRSJetuwl0AS5Oi/5FMV8kWm69RTlgm00GKjBO1xFHMtBbL49yRtMMdticBw==", + "commander": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", + "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", "dev": true - }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + } + } + }, + "webpack-cli": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", + "integrity": "sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.0", + "global-modules-path": "^2.3.0", + "import-local": "^2.0.0", + "interpret": "^1.1.0", + "loader-utils": "^1.1.0", + "supports-color": "^5.5.0", + "v8-compile-cache": "^2.0.2", + "yargs": "^12.0.2" + }, + "dependencies": { + "camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", "dev": true }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" } }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "execa": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", "dev": true, "requires": { - "is-extglob": "^1.0.0" - } - }, - "jscodeshift": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.4.1.tgz", - "integrity": "sha512-iOX6If+hsw0q99V3n31t4f5VlD1TQZddH08xbT65ZqA7T4Vkx68emrDZMUOLVvCEAJ6NpAk7DECe3fjC/t52AQ==", - "dev": true, - "requires": { - "async": "^1.5.0", - "babel-plugin-transform-flow-strip-types": "^6.8.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-stage-1": "^6.5.0", - "babel-register": "^6.9.0", - "babylon": "^6.17.3", - "colors": "^1.1.2", - "flow-parser": "^0.*", - "lodash": "^4.13.1", - "micromatch": "^2.3.7", - "node-dir": "0.1.8", - "nomnom": "^1.8.1", - "recast": "^0.12.5", - "temp": "^0.8.1", - "write-file-atomic": "^1.2.0" + "cross-spawn": "^6.0.0", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" } }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "locate-path": "^3.0.0" } }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" } }, - "nomnom": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/nomnom/-/nomnom-1.8.1.tgz", - "integrity": "sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=", - "dev": true, - "requires": { - "chalk": "~0.4.0", - "underscore": "~1.6.0" - } + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true }, - "recast": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.12.9.tgz", - "integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==", + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "ast-types": "0.10.1", - "core-js": "^2.4.1", - "esprima": "~4.0.0", - "private": "~0.1.5", - "source-map": "~0.6.1" + "invert-kv": "^2.0.0" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "strip-ansi": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", - "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=", - "dev": true - }, - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=", - "dev": true - }, - "write-file-atomic": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz", - "integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "slide": "^1.1.5" + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } - } - } - }, - "webpack-bundle-analyzer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.2.tgz", - "integrity": "sha512-cZG4wSQtKrSpk5RJ33dxiaAyo8bP0V+JvycAyIDFEiDIhw4LHhhVKhn40YT1w6TR9E4scHA00LnIoBtTA13Mow==", - "dev": true, - "requires": { - "acorn": "^5.7.3", - "bfj": "^6.1.1", - "chalk": "^2.4.1", - "commander": "^2.18.0", - "ejs": "^2.6.1", - "express": "^4.16.3", - "filesize": "^3.6.1", - "gzip-size": "^5.0.0", - "lodash": "^4.17.10", - "mkdirp": "^0.5.1", - "opener": "^1.5.1", - "ws": "^6.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true }, - "commander": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.18.0.tgz", - "integrity": "sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ==", - "dev": true - } - } - }, - "webpack-cli": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-2.1.3.tgz", - "integrity": "sha512-5AsKoL/Ccn8iTrwk3uErdyhetGH+c7VRQ7Itim2GL0IhBRq5rtojVDk00buMRmFmBpw1RvHXq97Gup965LbozA==", - "dev": true, - "requires": { - "chalk": "^2.3.2", - "cross-spawn": "^6.0.5", - "diff": "^3.5.0", - "enhanced-resolve": "^4.0.0", - "envinfo": "^4.4.2", - "glob-all": "^3.1.0", - "global-modules": "^1.0.0", - "got": "^8.2.0", - "import-local": "^1.0.0", - "inquirer": "^5.1.0", - "interpret": "^1.0.4", - "jscodeshift": "^0.5.0", - "listr": "^0.13.0", - "loader-utils": "^1.1.0", - "lodash": "^4.17.5", - "log-symbols": "^2.2.0", - "mkdirp": "^0.5.1", - "p-each-series": "^1.0.0", - "p-lazy": "^1.0.0", - "prettier": "^1.5.3", - "supports-color": "^5.3.0", - "v8-compile-cache": "^1.1.2", - "webpack-addons": "^1.1.5", - "yargs": "^11.1.0", - "yeoman-environment": "^2.0.0", - "yeoman-generator": "^2.0.4" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "mem": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", + "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" } }, - "got": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", - "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "os-locale": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz", + "integrity": "sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw==", "dev": true, "requires": { - "@sindresorhus/is": "^0.7.0", - "cacheable-request": "^2.1.1", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "into-stream": "^3.1.0", - "is-retry-allowed": "^1.1.0", - "isurl": "^1.0.0-alpha5", - "lowercase-keys": "^1.0.0", - "mimic-response": "^1.0.0", - "p-cancelable": "^0.4.0", - "p-timeout": "^2.0.1", - "pify": "^3.0.0", - "safe-buffer": "^5.1.1", - "timed-out": "^4.0.1", - "url-parse-lax": "^3.0.0", - "url-to-options": "^1.0.1" + "execa": "^0.10.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "p-limit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" + "p-try": "^2.0.0" } }, - "pify": { + "p-locate": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } }, - "prepend-http": { + "p-try": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", "dev": true }, - "url-parse-lax": { + "pkg-dir": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "prepend-http": "^2.0.0" + "has-flag": "^3.0.0" } }, + "v8-compile-cache": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", + "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", + "dev": true + }, "yargs": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", - "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "dev": true, "requires": { "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^2.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^9.0.2" + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" } }, "yargs-parser": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", - "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -23728,201 +21557,6 @@ "requires": { "fd-slicer": "~1.0.1" } - }, - "yeoman-environment": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.3.0.tgz", - "integrity": "sha512-PHSAkVOqYdcR+C+Uht1SGC4eVD/9OhygYFkYaI66xF8vKIeS1RNYay+umj2ZrQeJ50tF5Q/RSO6qGDz9y3Ifug==", - "dev": true, - "requires": { - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "diff": "^3.3.1", - "escape-string-regexp": "^1.0.2", - "globby": "^8.0.1", - "grouped-queue": "^0.3.3", - "inquirer": "^5.2.0", - "is-scoped": "^1.0.0", - "lodash": "^4.17.10", - "log-symbols": "^2.1.0", - "mem-fs": "^1.1.0", - "strip-ansi": "^4.0.0", - "text-table": "^0.2.0", - "untildify": "^3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "globby": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz", - "integrity": "sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw==", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "yeoman-generator": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-2.0.5.tgz", - "integrity": "sha512-rV6tJ8oYzm4mmdF2T3wjY+Q42jKF2YiiD0VKfJ8/0ZYwmhCKC9Xs2346HVLPj/xE13i68psnFJv7iS6gWRkeAg==", - "dev": true, - "requires": { - "async": "^2.6.0", - "chalk": "^2.3.0", - "cli-table": "^0.3.1", - "cross-spawn": "^6.0.5", - "dargs": "^5.1.0", - "dateformat": "^3.0.3", - "debug": "^3.1.0", - "detect-conflict": "^1.0.0", - "error": "^7.0.2", - "find-up": "^2.1.0", - "github-username": "^4.0.0", - "istextorbinary": "^2.2.1", - "lodash": "^4.17.10", - "make-dir": "^1.1.0", - "mem-fs-editor": "^4.0.0", - "minimist": "^1.2.0", - "pretty-bytes": "^4.0.2", - "read-chunk": "^2.1.0", - "read-pkg-up": "^3.0.0", - "rimraf": "^2.6.2", - "run-async": "^2.0.0", - "shelljs": "^0.8.0", - "text-table": "^0.2.0", - "through2": "^2.0.0", - "yeoman-environment": "^2.0.5" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "dargs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", - "integrity": "sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } - } } } } diff --git a/package.json b/package.json index 4a75bd538b9a6f..60146d1f6f48ee 100644 --- a/package.json +++ b/package.json @@ -112,9 +112,7 @@ "source-map-loader": "0.2.3", "stylelint-config-wordpress": "13.1.0", "uuid": "3.3.2", - "webpack": "4.8.3", "webpack-bundle-analyzer": "3.0.2", - "webpack-cli": "2.1.3", "webpack-livereload-plugin": "2.1.1", "webpack-rtl-plugin": "github:yoavf/webpack-rtl-plugin#develop" }, @@ -150,13 +148,13 @@ "clean:packages": "rimraf ./packages/*/build ./packages/*/build-module ./packages/*/build-style", "prebuild:packages": "npm run clean:packages && lerna run build && cross-env INCLUDE_PACKAGES=babel-plugin-import-jsx-pragma,postcss-themes,jest-console SKIP_JSX_PRAGMA_TRANSFORM=1 node ./bin/packages/build.js", "build:packages": "cross-env EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma,jest-console,postcss-themes node ./bin/packages/build.js", - "build": "npm run build:packages && cross-env NODE_ENV=production webpack", + "build": "npm run build:packages && wp-scripts build", "check-engines": "wp-scripts check-engines", "check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2\" \"wp-scripts check-licenses --dev\"", "precheck-local-changes": "npm run docs:build", "check-local-changes": "( git diff -U0 | xargs -0 node bin/process-git-diff ) || ( echo \"There are local uncommitted changes after one or both of 'npm install' or 'npm run docs:build'!\" && exit 1 );", "predev": "npm run check-engines", - "dev": "npm run build:packages && concurrently \"cross-env webpack --watch\" \"npm run dev:packages\"", + "dev": "npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"", "dev:packages": "node ./bin/packages/watch.js", "docs:build": "node docs/tool", "fixtures:clean": "rimraf \"test/integration/full-content/fixtures/*.+(json|serialized.html)\"", diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index 406db778448f67..40210edd4b1391 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -1,3 +1,10 @@ +## 2.6.0 (Unreleased) + +### New Features + +- Added support for `build` script ([#12837](https://github.com/WordPress/gutenberg/pull/12837)) +- Added support for `start` script ([#12837](https://github.com/WordPress/gutenberg/pull/12837)) + ## 2.5.0 (2019-01-09) ### New Features diff --git a/packages/scripts/README.md b/packages/scripts/README.md index 063d95184e5cb1..cc3f3b2b04a7c7 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -36,9 +36,27 @@ _Example:_ ## Available Scripts +### `build` + +Builds the code to the designated `build` folder in the configuration file. It correctly bundles code in production mode and optimizes the build for the best performance. Your code is ready to be deployed. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). + +_Example:_ + +```json +{ + "scripts": { + "build": "wp-scripts build" + } +} +``` + +This is how you execute the script with presented setup: +* `npm run build` - builds the code for production. + + ### `check-engines` -Check if the current `node`, `npm` (or `yarn`) versions match the given [semantic version](https://semver.org/) ranges. If the given version is not satisfied, information about installing the needed version is printed and the program exits with an error code. It uses [check-node-version](https://www.npmjs.com/package/check-node-version) behind the scenes with the recommended configuration provided. You can specify your own ranges as described in [check-node-version docs](https://www.npmjs.com/package/check-node-version). +Checks if the current `node`, `npm` (or `yarn`) versions match the given [semantic version](https://semver.org/) ranges. If the given version is not satisfied, information about installing the needed version is printed and the program exits with an error code. It uses [check-node-version](https://www.npmjs.com/package/check-node-version) behind the scenes with the recommended configuration provided. You can specify your own ranges as described in [check-node-version docs](https://www.npmjs.com/package/check-node-version). _Example:_ @@ -125,6 +143,23 @@ _Example:_ This is how you execute the script with presented setup: * `npm run lint:css` - lints CSS files in the whole project's directory. +### `start` + +Builds the code for development to the designated `build` folder in the configuration file. The script will automatically rebuild if you make changes to the code. You will see the build errors in the console. It uses [Webpack](https://webpack.js.org/) behind the scenes and you still need to provide your own config as described in the [documentation](https://webpack.js.org/concepts/configuration/). + +_Example:_ + +```json +{ + "scripts": { + "start": "wp-scripts start" + } +} +``` + +This is how you execute the script with presented setup: +* `npm start` - starts the build for development. + ### `test-e2e` Launches the End-To-End (E2E) test runner. It uses [Jest](https://jestjs.io/) behind the scenes and you are able to utilize all of its [CLI options](https://jestjs.io/docs/en/cli.html). You can also run `./node_modules/.bin/wp-scripts test:e2e --help` or `npm run test:e2e:help` (as presented below) to view all of the available options. diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 31441fc5fdd49c..86d4211b874d5e 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -46,7 +46,9 @@ "read-pkg-up": "^1.0.1", "resolve-bin": "^0.4.0", "stylelint": "^9.10.1", - "stylelint-config-wordpress": "^13.1.0" + "stylelint-config-wordpress": "^13.1.0", + "webpack": "4.8.3", + "webpack-cli": "^3.1.2" }, "publishConfig": { "access": "public" diff --git a/packages/scripts/scripts/build.js b/packages/scripts/scripts/build.js new file mode 100644 index 00000000000000..9470274f76633c --- /dev/null +++ b/packages/scripts/scripts/build.js @@ -0,0 +1,35 @@ +/** + * External dependencies + */ +const { sync: spawn } = require( 'cross-spawn' ); +const { sync: resolveBin } = require( 'resolve-bin' ); + +/** + * Internal dependencies + */ +const { + getCliArgs, + hasCliArg, + hasProjectFile, +} = require( '../utils' ); + +const hasWebpackConfig = hasCliArg( '--config' ) || + hasProjectFile( 'webpack.config.js' ) || + hasProjectFile( 'webpack.config.babel.js' ); + +if ( hasWebpackConfig ) { + // Sets environment to production. + process.env.NODE_ENV = 'production'; + + const { status } = spawn( + resolveBin( 'webpack' ), + getCliArgs(), + { stdio: 'inherit' } + ); + process.exit( status ); +} else { + // eslint-disable-next-line no-console + console.log( 'Webpack config file is missing.' ); + process.exit( 1 ); +} + diff --git a/packages/scripts/scripts/start.js b/packages/scripts/scripts/start.js new file mode 100644 index 00000000000000..db42c33ba447fb --- /dev/null +++ b/packages/scripts/scripts/start.js @@ -0,0 +1,31 @@ +/** + * External dependencies + */ +const { sync: spawn } = require( 'cross-spawn' ); +const { sync: resolveBin } = require( 'resolve-bin' ); + +/** + * Internal dependencies + */ +const { + getCliArgs, + hasCliArg, + hasProjectFile, +} = require( '../utils' ); + +const hasWebpackConfig = hasCliArg( '--config' ) || + hasProjectFile( 'webpack.config.js' ) || + hasProjectFile( 'webpack.config.babel.js' ); + +if ( hasWebpackConfig ) { + const { status } = spawn( + resolveBin( 'webpack' ), + [ '--watch', ...getCliArgs() ], + { stdio: 'inherit' } + ); + process.exit( status ); +} else { + // eslint-disable-next-line no-console + console.log( 'Webpack config file is missing.' ); + process.exit( 1 ); +} From 2b303c4430fb349d60d371e3f6042c23a6b4caba Mon Sep 17 00:00:00 2001 From: Paul Sealock <psealock@gmail.com> Date: Wed, 23 Jan 2019 21:48:46 +1300 Subject: [PATCH 36/56] Dropdown: add focusOnMount prop to pass onto Popover component (#12855) --- packages/components/CHANGELOG.md | 4 ++++ packages/components/src/dropdown/README.md | 10 ++++++++++ packages/components/src/dropdown/index.js | 2 ++ 3 files changed, 16 insertions(+) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index ad2e5be8e71211..1ec2b397bcea6d 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -9,6 +9,10 @@ - Resolves a conflict where two instance of Slot would produce an inconsistent or duplicated rendering output. +### New Feature + +- `Dropdown` now has a `focusOnMount` prop which is passed directly to the contained `Popover`. + ## 7.0.5 (2019-01-03) ## 7.0.4 (2018-12-12) diff --git a/packages/components/src/dropdown/README.md b/packages/components/src/dropdown/README.md index 552fb2741776ea..0e09a6651dcd92 100644 --- a/packages/components/src/dropdown/README.md +++ b/packages/components/src/dropdown/README.md @@ -90,3 +90,13 @@ Opt-in prop to show popovers fullscreen on mobile, pass `false` in this prop to - Type: `String` - Required: No + + ### focusOnMount + + By default, the *first tabblable element* in the popover will receive focus when it mounts. This is the same as setting `focusOnMount` to `"firstElement"`. If you want to focus the container instead, you can set `focusOnMount` to `"container"`. + + Set this prop to `false` to disable focus changing entirely. This should only be set when an appropriately accessible substitute behavior exists. + + - Type: `String` or `Boolean` + - Required: No + - Default: `"firstElement"` diff --git a/packages/components/src/dropdown/index.js b/packages/components/src/dropdown/index.js index 81ebe65da6534d..b4d9082af3cdc0 100644 --- a/packages/components/src/dropdown/index.js +++ b/packages/components/src/dropdown/index.js @@ -73,6 +73,7 @@ class Dropdown extends Component { contentClassName, expandOnMobile, headerTitle, + focusOnMount, } = this.props; const args = { isOpen, onToggle: this.toggle, onClose: this.close }; @@ -88,6 +89,7 @@ class Dropdown extends Component { onClickOutside={ this.closeIfClickOutside } expandOnMobile={ expandOnMobile } headerTitle={ headerTitle } + focusOnMount={ focusOnMount } > { renderContent( args ) } </Popover> From 5ff463a9a59e217a8de10eb88c140a91a3366947 Mon Sep 17 00:00:00 2001 From: Paul Sealock <psealock@gmail.com> Date: Wed, 23 Jan 2019 21:49:54 +1300 Subject: [PATCH 37/56] DateTimePicker: fix prop warning for (#12933) --- packages/components/src/date-time/date.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/src/date-time/date.js b/packages/components/src/date-time/date.js index 0854846b752446..7da1bf4f418239 100644 --- a/packages/components/src/date-time/date.js +++ b/packages/components/src/date-time/date.js @@ -43,7 +43,6 @@ class DatePicker extends Component { return ( <div className="components-datetime__date"> <DayPickerSingleDateController - block date={ momentDate } daySize={ 30 } focused From 5959a2c303ddaf834276bbac69e81d5beb136565 Mon Sep 17 00:00:00 2001 From: Daniel Richards <daniel.p.richards@gmail.com> Date: Wed, 23 Jan 2019 17:22:49 +0800 Subject: [PATCH 38/56] Update plugin version to 4.9.0 (#13436) --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 794558c4dd70cc..09c0b5d67eebc2 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -3,7 +3,7 @@ * Plugin Name: Gutenberg * Plugin URI: https://github.com/WordPress/gutenberg * Description: Printing since 1440. This is the development plugin for the new block editor in core. - * Version: 4.9.0-rc.1 + * Version: 4.9.0 * Author: Gutenberg Team * * @package gutenberg diff --git a/package-lock.json b/package-lock.json index 66e4036ba60bb1..307215cb6a5b25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "4.9.0-rc.1", + "version": "4.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 60146d1f6f48ee..ca66510ec46b6c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "4.9.0-rc.1", + "version": "4.9.0", "private": true, "description": "A new WordPress editor experience", "repository": "git+https://github.com/WordPress/gutenberg.git", From 2da2a2c794c502774dff18bf39ce1ee248efd338 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad <kjell@kjellr.com> Date: Wed, 23 Jan 2019 04:49:32 -0500 Subject: [PATCH 39/56] Consider making Fullscreen Mode effects visible only on larger screens (#13425) * Hide the fullscreen "exit" icon on small screens When fullscreen mode is active, we place an exit/back button in the upper left corner of the screen to give users a way to exit the editor. This button persists on small screens, even though Fullscreen Mode cannot be toggled at that screen size. This commit hides the exit/back icon at small screen sizes. * Migrate more fullscreen rules to medium+ breakpoints only. * Update style.scss --- .../src/components/fullscreen-mode/style.scss | 45 ++++++++++--------- .../header/fullscreen-mode-close/style.scss | 17 ++++--- .../src/components/header/style.scss | 4 -- .../src/components/layout/style.scss | 4 -- .../src/components/sidebar/style.scss | 18 +++----- .../src/components/text-editor/style.scss | 4 -- packages/edit-post/src/style.scss | 4 -- 7 files changed, 43 insertions(+), 53 deletions(-) diff --git a/packages/edit-post/src/components/fullscreen-mode/style.scss b/packages/edit-post/src/components/fullscreen-mode/style.scss index 8e5b6e2218561d..0d044161b9e538 100644 --- a/packages/edit-post/src/components/fullscreen-mode/style.scss +++ b/packages/edit-post/src/components/fullscreen-mode/style.scss @@ -1,29 +1,32 @@ body.js.is-fullscreen-mode { - // Reset the html.wp-topbar padding - // Because this uses negative margins, we have to compensate for the height. - margin-top: -$admin-bar-height-big; - height: calc(100% + #{ $admin-bar-height-big }); - @include break-medium() { - margin-top: -$admin-bar-height; - height: calc(100% + #{ $admin-bar-height }); - } - #adminmenumain, - #wpadminbar { - display: none; - } + @include break-medium { + // Reset the html.wp-topbar padding. + // Because this uses negative margins, we have to compensate for the height. + margin-top: -$admin-bar-height-big; + height: calc(100% + #{ $admin-bar-height-big }); + @include break-medium() { + margin-top: -$admin-bar-height; + height: calc(100% + #{ $admin-bar-height }); + } - #wpcontent, - #wpfooter { - margin-left: 0; - } + #adminmenumain, + #wpadminbar { + display: none; + } + + #wpcontent, + #wpfooter { + margin-left: 0; + } - // Animations - @include edit-post__fade-in-animation(0.3s); + // Animations. + @include edit-post__fade-in-animation(0.3s); - .edit-post-header { - transform: translateY(-100%); - animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards; + .edit-post-header { + transform: translateY(-100%); + animation: edit-post-fullscreen-mode__slide-in-animation 0.1s forwards; + } } } diff --git a/packages/edit-post/src/components/header/fullscreen-mode-close/style.scss b/packages/edit-post/src/components/header/fullscreen-mode-close/style.scss index e6a3c7285b8868..26d43a35d74584 100644 --- a/packages/edit-post/src/components/header/fullscreen-mode-close/style.scss +++ b/packages/edit-post/src/components/header/fullscreen-mode-close/style.scss @@ -1,7 +1,14 @@ .edit-post-fullscreen-mode-close__toolbar { - border-top: 0; - border-bottom: 0; - border-left: 0; - margin: -9px 10px -9px -10px; - padding: 9px 10px; + // Do not show the toolbar icon on small screens, + // when Fullscreen Mode is not an option in the "More" menu. + display: none; + + @include break-medium() { + display: block; + border-top: 0; + border-bottom: 0; + border-left: 0; + margin: -9px 10px -9px -10px; + padding: 9px 10px; + } } diff --git a/packages/edit-post/src/components/header/style.scss b/packages/edit-post/src/components/header/style.scss index 987dcbfd5e14cd..6676d35676b7d2 100644 --- a/packages/edit-post/src/components/header/style.scss +++ b/packages/edit-post/src/components/header/style.scss @@ -20,10 +20,6 @@ position: fixed; padding: $grid-size; top: $admin-bar-height-big; - - body.is-fullscreen-mode & { - top: 0; - } } @include break-medium() { diff --git a/packages/edit-post/src/components/layout/style.scss b/packages/edit-post/src/components/layout/style.scss index 3aa896af7b377b..963862b7105d73 100644 --- a/packages/edit-post/src/components/layout/style.scss +++ b/packages/edit-post/src/components/layout/style.scss @@ -167,10 +167,6 @@ left: 0; overflow: auto; - body.is-fullscreen-mode & { - top: 0; - } - @include break-medium() { top: $admin-bar-height; left: auto; diff --git a/packages/edit-post/src/components/sidebar/style.scss b/packages/edit-post/src/components/sidebar/style.scss index c33aee329d7065..cd8256823d4e75 100644 --- a/packages/edit-post/src/components/sidebar/style.scss +++ b/packages/edit-post/src/components/sidebar/style.scss @@ -17,10 +17,6 @@ height: auto; overflow: auto; -webkit-overflow-scrolling: touch; - - body.is-fullscreen-mode & { - top: $header-height; - } } @include break-medium() { @@ -41,18 +37,18 @@ margin-top: -1px; margin-bottom: -1px; - body.is-fullscreen-mode & { - max-height: calc(100vh - #{ $panel-header-height }); - @include break-small() { - max-height: none; - } - } - @include break-small() { overflow: inherit; height: auto; max-height: none; } + + @include break-medium() { + + body.is-fullscreen-mode & { + max-height: calc(100vh - #{ $panel-header-height }); + } + } } > .components-panel .components-panel__header { diff --git a/packages/edit-post/src/components/text-editor/style.scss b/packages/edit-post/src/components/text-editor/style.scss index b04479300535f9..1a5980bc5e022c 100644 --- a/packages/edit-post/src/components/text-editor/style.scss +++ b/packages/edit-post/src/components/text-editor/style.scss @@ -3,10 +3,6 @@ @include break-small() { padding-top: ($grid-size * 5) + $admin-bar-height-big; - - body.is-fullscreen-mode & { - padding-top: $grid-size * 5; - } } @include break-medium() { diff --git a/packages/edit-post/src/style.scss b/packages/edit-post/src/style.scss index 44ad95c3351652..90fac100e15eed 100644 --- a/packages/edit-post/src/style.scss +++ b/packages/edit-post/src/style.scss @@ -120,10 +120,6 @@ body.block-editor-page { bottom: 0; left: 0; min-height: calc(100vh - #{ $admin-bar-height-big }); - - body.is-fullscreen-mode & { - min-height: 100vh; - } } // The WP header height changes at this breakpoint From 22abc9ed0166635eba0e08da1f088dc0c09645cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= <soerenwrede@gmail.com> Date: Wed, 23 Jan 2019 14:13:18 +0100 Subject: [PATCH 40/56] Fix: File block add custom class (#13432) ## Description The custom class should only be added to the wrapper, not every div Fixes #13430 --- packages/block-library/src/file/edit.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/file/edit.js b/packages/block-library/src/file/edit.js index eb707a104eec5d..002bd43cf3617b 100644 --- a/packages/block-library/src/file/edit.js +++ b/packages/block-library/src/file/edit.js @@ -184,9 +184,9 @@ class FileEdit extends Component { </MediaUploadCheck> </BlockControls> <div className={ classes }> - <div className={ `${ className }__content-wrapper` }> + <div className={ 'wp-block-file__content-wrapper' }> <RichText - wrapperClassName={ `${ className }__textlink` } + wrapperClassName={ 'wp-block-file__textlink' } tagName="div" // must be block-level or else cursor disappears value={ fileName } placeholder={ __( 'Write file name…' ) } @@ -195,11 +195,11 @@ class FileEdit extends Component { onChange={ ( text ) => setAttributes( { fileName: text } ) } /> { showDownloadButton && - <div className={ `${ className }__button-richtext-wrapper` }> + <div className={ 'wp-block-file__button-richtext-wrapper' }> { /* Using RichText here instead of PlainText so that it can be styled like a button */ } <RichText tagName="div" // must be block-level or else cursor disappears - className={ `${ className }__button` } + className={ 'wp-block-file__button' } value={ downloadButtonText } formattingControls={ [] } // disable controls placeholder={ __( 'Add text…' ) } @@ -213,7 +213,7 @@ class FileEdit extends Component { <ClipboardButton isDefault text={ href } - className={ `${ className }__copy-url-button` } + className={ 'wp-block-file__copy-url-button' } onCopy={ this.confirmCopyURL } onFinishCopy={ this.resetCopyConfirmation } disabled={ isBlobURL( href ) } From c501353388eb7e0f6a30f6ee491b7ea73e688031 Mon Sep 17 00:00:00 2001 From: Darren Ethier <darren@roughsmootheng.in> Date: Wed, 23 Jan 2019 08:52:47 -0500 Subject: [PATCH 41/56] Improve castError handling of non strings (#13315) This pull removes castError from reduxRoutine and just passes along the value thrown instead of potentially coercing to an error. - Exposes values to consuming code. - Less opinionated about what happens with the error. --- packages/redux-routine/CHANGELOG.md | 4 +++- packages/redux-routine/src/cast-error.js | 14 -------------- packages/redux-routine/src/runtime.js | 6 +----- packages/redux-routine/src/test/cast-error.js | 18 ------------------ packages/redux-routine/src/test/index.js | 2 +- 5 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 packages/redux-routine/src/cast-error.js delete mode 100644 packages/redux-routine/src/test/cast-error.js diff --git a/packages/redux-routine/CHANGELOG.md b/packages/redux-routine/CHANGELOG.md index b820720f392bc6..dbddb8321016b6 100644 --- a/packages/redux-routine/CHANGELOG.md +++ b/packages/redux-routine/CHANGELOG.md @@ -2,7 +2,9 @@ ### Bug Fixes -- Fix unhandled promise rejection error caused by returning null from registered generator ([#13314](https://github.com/WordPress/gutenberg/pull/13314) +- Fix unhandled promise rejection error caused by returning null from registered generator ([#13314](https://github.com/WordPress/gutenberg/pull/13314)) +- The middleware will no longer attempt to coerce an error to an instance of `Error`, and instead passes through the thrown value directly. This resolves issues where an `Error` would be thrown when the underlying values were not of type `Error` or `string` (e.g. a thrown object) and the message would end up not being useful (e.g. `[Object object]`). +([#13315](https://github.com/WordPress/gutenberg/pull/13315)) ## 3.0.3 (2018-10-19) diff --git a/packages/redux-routine/src/cast-error.js b/packages/redux-routine/src/cast-error.js deleted file mode 100644 index 9bc2e22a46d404..00000000000000 --- a/packages/redux-routine/src/cast-error.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Casts value as an error if it's not one. - * - * @param {*} error The value to cast. - * - * @return {Error} The cast error. - */ -export default function castError( error ) { - if ( ! ( error instanceof Error ) ) { - error = new Error( error ); - } - - return error; -} diff --git a/packages/redux-routine/src/runtime.js b/packages/redux-routine/src/runtime.js index 484d65ac6c0354..d3de265c3f2b15 100644 --- a/packages/redux-routine/src/runtime.js +++ b/packages/redux-routine/src/runtime.js @@ -8,7 +8,6 @@ import isPromise from 'is-promise'; /** * Internal dependencies */ -import castError from './cast-error'; import { isActionOfType, isAction } from './is-action'; /** @@ -27,10 +26,7 @@ export default function createRuntime( controls = {}, dispatch ) { const routine = control( value ); if ( isPromise( routine ) ) { // Async control routine awaits resolution. - routine.then( - yieldNext, - ( error ) => yieldError( castError( error ) ), - ); + routine.then( yieldNext, yieldError ); } else { next( routine ); } diff --git a/packages/redux-routine/src/test/cast-error.js b/packages/redux-routine/src/test/cast-error.js deleted file mode 100644 index bdca1c7c202b9d..00000000000000 --- a/packages/redux-routine/src/test/cast-error.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Internal dependencies - */ -import castError from '../cast-error'; - -describe( 'castError', () => { - it( 'should return error verbatim', () => { - const error = new Error( 'Foo' ); - - expect( castError( error ) ).toBe( error ); - } ); - - it( 'should return string as message of error', () => { - const error = 'Foo'; - - expect( castError( error ) ).toEqual( new Error( 'Foo' ) ); - } ); -} ); diff --git a/packages/redux-routine/src/test/index.js b/packages/redux-routine/src/test/index.js index 98aedf7bbef473..79a35673f70a59 100644 --- a/packages/redux-routine/src/test/index.js +++ b/packages/redux-routine/src/test/index.js @@ -61,7 +61,7 @@ describe( 'createMiddleware', () => { try { yield { type: 'WAIT_FAIL' }; } catch ( error ) { - expect( error.message ).toBe( 'Message' ); + expect( error ).toBe( 'Message' ); } } From 148e816ed15814a08fb99ed8d329fc3ebbe72dfb Mon Sep 17 00:00:00 2001 From: Pinar Olguc <pinarolguc@gmail.com> Date: Wed, 23 Jan 2019 17:13:28 +0300 Subject: [PATCH 42/56] [Mobile] Improve keyboard hide button (#13415) * Allow passing style to toolbar container * Replace right border with left border * Add keyboard-hide icon * Fix lint issue --- packages/components/src/dashicon/index.js | 3 +++ packages/components/src/toolbar/index.js | 4 ++-- packages/components/src/toolbar/style.native.scss | 4 ++-- packages/components/src/toolbar/toolbar-container.native.js | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/components/src/dashicon/index.js b/packages/components/src/dashicon/index.js index b58f77bfe371a5..943282bc7d3e02 100644 --- a/packages/components/src/dashicon/index.js +++ b/packages/components/src/dashicon/index.js @@ -568,6 +568,9 @@ export default class Dashicon extends Component { case 'instagram': path = 'M12.67 10A2.67 2.67 0 1 0 10 12.67 2.68 2.68 0 0 0 12.67 10zm1.43 0A4.1 4.1 0 1 1 10 5.9a4.09 4.09 0 0 1 4.1 4.1zm1.13-4.27a1 1 0 1 1-1-1 1 1 0 0 1 1 1zM10 3.44c-1.17 0-3.67-.1-4.72.32a2.67 2.67 0 0 0-1.52 1.52c-.42 1-.32 3.55-.32 4.72s-.1 3.67.32 4.72a2.74 2.74 0 0 0 1.52 1.52c1 .42 3.55.32 4.72.32s3.67.1 4.72-.32a2.83 2.83 0 0 0 1.52-1.52c.42-1.05.32-3.55.32-4.72s.1-3.67-.32-4.72a2.74 2.74 0 0 0-1.52-1.52c-1.05-.42-3.55-.32-4.72-.32zM18 10c0 1.1 0 2.2-.05 3.3a4.84 4.84 0 0 1-1.29 3.36A4.8 4.8 0 0 1 13.3 18H6.7a4.84 4.84 0 0 1-3.36-1.29 4.84 4.84 0 0 1-1.29-3.41C2 12.2 2 11.1 2 10V6.7a4.84 4.84 0 0 1 1.34-3.36A4.8 4.8 0 0 1 6.7 2.05C7.8 2 8.9 2 10 2h3.3a4.84 4.84 0 0 1 3.36 1.29A4.8 4.8 0 0 1 18 6.7V10z'; break; + case 'keyboard-hide': + path = 'M18,0 L2,0 C0.9,0 0.01,0.9 0.01,2 L0,12 C0,13.1 0.9,14 2,14 L18,14 C19.1,14 20,13.1 20,12 L20,2 C20,0.9 19.1,0 18,0 Z M18,12 L2,12 L2,2 L18,2 L18,12 Z M9,3 L11,3 L11,5 L9,5 L9,3 Z M9,6 L11,6 L11,8 L9,8 L9,6 Z M6,3 L8,3 L8,5 L6,5 L6,3 Z M6,6 L8,6 L8,8 L6,8 L6,6 Z M3,6 L5,6 L5,8 L3,8 L3,6 Z M3,3 L5,3 L5,5 L3,5 L3,3 Z M6,9 L14,9 L14,11 L6,11 L6,9 Z M12,6 L14,6 L14,8 L12,8 L12,6 Z M12,3 L14,3 L14,5 L12,5 L12,3 Z M15,6 L17,6 L17,8 L15,8 L15,6 Z M15,3 L17,3 L17,5 L15,5 L15,3 Z M10,20 L14,16 L6,16 L10,20 Z'; + break; case 'laptop': path = 'M3 3h14c.6 0 1 .4 1 1v10c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1zm13 2H4v8h12V5zm-3 1H5v4zm6 11v-1H1v1c0 .6.5 1 1.1 1h15.8c.6 0 1.1-.4 1.1-1z'; break; diff --git a/packages/components/src/toolbar/index.js b/packages/components/src/toolbar/index.js index 15fc1972b44979..64e4f8359919de 100644 --- a/packages/components/src/toolbar/index.js +++ b/packages/components/src/toolbar/index.js @@ -41,7 +41,7 @@ import ToolbarContainer from './toolbar-container'; * * @return {ReactElement} The rendered toolbar. */ -function Toolbar( { controls = [], children, className, isCollapsed, icon, label } ) { +function Toolbar( { controls = [], children, className, isCollapsed, icon, label, ...otherProps } ) { if ( ( ! controls || ! controls.length ) && ! children @@ -67,7 +67,7 @@ function Toolbar( { controls = [], children, className, isCollapsed, icon, label } return ( - <ToolbarContainer className={ classnames( 'components-toolbar', className ) }> + <ToolbarContainer className={ classnames( 'components-toolbar', className ) } { ...otherProps }> { flatMap( controlSets, ( controlSet, indexOfSet ) => ( controlSet.map( ( control, indexOfControl ) => ( <ToolbarButton diff --git a/packages/components/src/toolbar/style.native.scss b/packages/components/src/toolbar/style.native.scss index aca87d859b8bb6..1e0d176e275d80 100644 --- a/packages/components/src/toolbar/style.native.scss +++ b/packages/components/src/toolbar/style.native.scss @@ -1,7 +1,7 @@ .container { flex-direction: row; - border-right-width: 1px; - border-right-color: #e9eff3; + border-left-width: 1px; + border-color: #e9eff3; padding-left: 5px; padding-right: 5px; } diff --git a/packages/components/src/toolbar/toolbar-container.native.js b/packages/components/src/toolbar/toolbar-container.native.js index dba6d5123c1ae7..d147c547add6d7 100644 --- a/packages/components/src/toolbar/toolbar-container.native.js +++ b/packages/components/src/toolbar/toolbar-container.native.js @@ -6,7 +6,7 @@ import { View } from 'react-native'; import styles from './style.scss'; const ToolbarContainer = ( props ) => ( - <View style={ styles.container }> + <View style={ [ styles.container, props.passedStyle ] }> { props.children } </View> ); From 60bd2a598b98179b2eb5ee183cd73006e99862e9 Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Wed, 23 Jan 2019 10:43:49 -0500 Subject: [PATCH 43/56] Framework: Bump minimum required WP to 5.x (#13370) --- gutenberg.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 09c0b5d67eebc2..655e883859fda6 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -146,7 +146,7 @@ function is_gutenberg_page() { */ function gutenberg_wordpress_version_notice() { echo '<div class="error"><p>'; - _e( 'Gutenberg requires WordPress 4.9.8 or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ); + _e( 'Gutenberg requires WordPress 5.0.0 or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ); echo '</p></div>'; deactivate_plugins( array( 'gutenberg/gutenberg.php' ) ); @@ -180,7 +180,7 @@ function gutenberg_pre_init() { // Strip '-src' from the version string. Messes up version_compare(). $version = str_replace( '-src', '', $wp_version ); - if ( version_compare( $version, '4.9.8', '<' ) ) { + if ( version_compare( $version, '5.0.0', '<' ) ) { add_action( 'admin_notices', 'gutenberg_wordpress_version_notice' ); return; } From b9e76863669661b8a6cfdb7562e74cbf802f1dca Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Wed, 23 Jan 2019 11:05:47 -0500 Subject: [PATCH 44/56] Plugin: Remove 5.0-merged block registration functions, integrations (#13412) --- .../backward-compatibility/deprecations.md | 11 + lib/blocks.php | 165 ++------------ lib/class-wp-block-type-registry.php | 182 --------------- lib/class-wp-block-type.php | 209 ------------------ lib/load.php | 6 - phpunit/class-blocks-api-test.php | 29 +-- 6 files changed, 32 insertions(+), 570 deletions(-) delete mode 100644 lib/class-wp-block-type-registry.php delete mode 100644 lib/class-wp-block-type.php diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index cf98cdb9fe1dde..6db2ed322b6a5b 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -2,6 +2,17 @@ The Gutenberg project's deprecation policy is intended to support backward compatibility for releases, when possible. The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version. +## 5.2.0 + +- The PHP function `gutenberg_parse_blocks` has been removed. Use [`parse_blocks`](https://developer.wordpress.org/reference/functions/parse_blocks/) instead. +- The PHP function `get_dynamic_blocks_regex` has been removed. +- The PHP function `gutenberg_render_block` has been removed. Use [`render_block`](https://developer.wordpress.org/reference/functions/render_block/) instead. +- The PHP function `strip_dynamic_blocks` has been removed. For use in excerpt preparation, consider [`excerpt_remove_blocks`](https://developer.wordpress.org/reference/functions/excerpt_remove_blocks/) instead. +- The PHP function `strip_dynamic_blocks_add_filter` has been removed. +- The PHP function `strip_dynamic_blocks_remove_filter` has been removed. +- The PHP function `gutenberg_post_has_blocks` has been removed. Use [`has_blocks`](https://developer.wordpress.org/reference/functions/has_blocks/) instead. +- The PHP function `gutenberg_content_has_blocks` has been removed. Use [`has_blocks`](https://developer.wordpress.org/reference/functions/has_blocks/) instead. + ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. - `wp.editor.PostPublishPanelToggle` has been deprecated in favor of `wp.editor.PostPublishButton`. diff --git a/lib/blocks.php b/lib/blocks.php index 0b11041d0576de..3419e81c8bb38d 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -9,89 +9,20 @@ die( 'Silence is golden.' ); } -if ( ! function_exists( 'register_block_type' ) ) { - /** - * Registers a block type. - * - * @since 0.1.0 - * @since 0.6.0 Now also accepts a WP_Block_Type instance as first parameter. - * - * @param string|WP_Block_Type $name Block type name including namespace, or alternatively a - * complete WP_Block_Type instance. In case a WP_Block_Type - * is provided, the $args parameter will be ignored. - * @param array $args { - * Optional. Array of block type arguments. Any arguments may be defined, however the - * ones described below are supported by default. Default empty array. - * - * @type callable $render_callback Callback used to render blocks of this block type. - * } - * @return WP_Block_Type|false The registered block type on success, or false on failure. - */ - function register_block_type( $name, $args = array() ) { - return WP_Block_Type_Registry::get_instance()->register( $name, $args ); - } -} - -if ( ! function_exists( 'unregister_block_type' ) ) { - /** - * Unregisters a block type. - * - * @since 0.1.0 - * @since 0.6.0 Now also accepts a WP_Block_Type instance as first parameter. - * - * @param string|WP_Block_Type $name Block type name including namespace, or alternatively a - * complete WP_Block_Type instance. - * @return WP_Block_Type|false The unregistered block type on success, or false on failure. - */ - function unregister_block_type( $name ) { - return WP_Block_Type_Registry::get_instance()->unregister( $name ); - } -} - if ( ! function_exists( 'gutenberg_parse_blocks' ) ) { /** * Parses blocks out of a content string. * * @since 0.5.0 + * @deprecated 5.0.0 parse_blocks() * * @param string $content Post content. * @return array Array of parsed block objects. */ function gutenberg_parse_blocks( $content ) { - /** - * Filter to allow plugins to replace the server-side block parser - * - * @since 3.8.0 - * - * @param string $parser_class Name of block parser class - */ - $parser_class = apply_filters( 'block_parser_class', 'WP_Block_Parser' ); - // Load default block parser for server-side parsing if the default parser class is being used. - if ( 'WP_Block_Parser' === $parser_class ) { - require_once dirname( __FILE__ ) . '/../packages/block-serialization-default-parser/parser.php'; - } - $parser = new $parser_class(); - return $parser->parse( $content ); - } -} - -if ( ! function_exists( 'get_dynamic_block_names' ) ) { - /** - * Returns an array of the names of all registered dynamic block types. - * - * @return array Array of dynamic block names. - */ - function get_dynamic_block_names() { - $dynamic_block_names = array(); + _deprecated_function( __FUNCTION__, '5.0.0', 'parse_blocks()' ); - $block_types = WP_Block_Type_Registry::get_instance()->get_all_registered(); - foreach ( $block_types as $block_type ) { - if ( $block_type->is_dynamic() ) { - $dynamic_block_names[] = $block_type->name; - } - } - - return $dynamic_block_names; + return parse_blocks( $content ); } } @@ -100,10 +31,13 @@ function get_dynamic_block_names() { * Retrieve the dynamic blocks regular expression for searching. * * @since 3.6.0 + * @deprecated 5.0.0 * * @return string */ function get_dynamic_blocks_regex() { + _deprecated_function( __FUNCTION__, '5.0.0' ); + $dynamic_block_names = get_dynamic_block_names(); $dynamic_block_pattern = ( '/<!--\s+wp:(' . @@ -135,85 +69,15 @@ function get_dynamic_blocks_regex() { * @since 1.9.0 * @since 4.4.0 renders full nested tree of blocks before reassembling into HTML string * @global WP_Post $post The post to edit. + * @deprecated 5.0.0 render_block() * * @param array $block A single parsed block object. * @return string String of rendered HTML. */ function gutenberg_render_block( $block ) { - global $post; - - $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] ); - $is_dynamic = $block['blockName'] && null !== $block_type && $block_type->is_dynamic(); - $inner_content = ''; - $index = 0; - - foreach ( $block['innerContent'] as $chunk ) { - $inner_content .= is_string( $chunk ) ? $chunk : gutenberg_render_block( $block['innerBlocks'][ $index++ ] ); - } - - if ( $is_dynamic ) { - $attributes = is_array( $block['attrs'] ) ? (array) $block['attrs'] : array(); - $global_post = $post; - $output = $block_type->render( $attributes, $inner_content ); - $post = $global_post; + _deprecated_function( __FUNCTION__, '5.0.0', 'render_block()' ); - return $output; - } - - return $inner_content; -} - -if ( ! function_exists( 'do_blocks' ) ) { - /** - * Parses dynamic blocks out of `post_content` and re-renders them. - * - * @since 0.1.0 - * @since 4.4.0 performs full parse on input post content - * - * @param string $content Post content. - * @return string Updated post content. - */ - function do_blocks( $content ) { - // If there are blocks in this content, we shouldn't run wpautop() on it later. - $priority = has_filter( 'the_content', 'wpautop' ); - if ( false !== $priority && doing_filter( 'the_content' ) && has_blocks( $content ) ) { - remove_filter( 'the_content', 'wpautop', $priority ); - add_filter( 'the_content', '_restore_wpautop_hook', $priority + 1 ); - } - - $blocks = gutenberg_parse_blocks( $content ); - $output = ''; - - foreach ( $blocks as $block ) { - $output .= gutenberg_render_block( $block ); - } - - return $output; - } - - add_filter( 'the_content', 'do_blocks', 7 ); // BEFORE do_shortcode() and oembed. -} - -if ( ! function_exists( '_restore_wpautop_hook' ) ) { - /** - * If do_blocks() needs to remove wpautop() from the `the_content` filter, - * this re-adds it afterwards, for subsequent `the_content` usage. - * - * @access private - * - * @since 4.6.0 - * - * @param string $content The post content running through this filter. - * @return string The unmodified content. - */ - function _restore_wpautop_hook( $content ) { - $current_priority = has_filter( 'the_content', '_restore_wpautop_hook' ); - - add_filter( 'the_content', 'wpautop', $current_priority - 1 ); - remove_filter( 'the_content', '_restore_wpautop_hook', $current_priority ); - - return $content; - } + return render_block( $block ); } if ( ! function_exists( 'strip_dynamic_blocks' ) ) { @@ -221,11 +85,14 @@ function _restore_wpautop_hook( $content ) { * Remove all dynamic blocks from the given content. * * @since 3.6.0 + * @deprecated 5.0.0 * * @param string $content Content of the current post. * @return string */ function strip_dynamic_blocks( $content ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); + return preg_replace( get_dynamic_blocks_regex(), '', $content ); } } @@ -238,16 +105,18 @@ function strip_dynamic_blocks( $content ) { * can just be called in `wp_trim_excerpt()`. * * @since 3.6.0 + * @deprecated 5.0.0 * * @param string $text Excerpt. * @return string */ function strip_dynamic_blocks_add_filter( $text ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); + add_filter( 'the_content', 'strip_dynamic_blocks', 6 ); return $text; } - add_filter( 'get_the_excerpt', 'strip_dynamic_blocks_add_filter', 9 ); // Before wp_trim_excerpt(). } if ( ! function_exists( 'strip_dynamic_blocks_remove_filter' ) ) { @@ -258,14 +127,16 @@ function strip_dynamic_blocks_add_filter( $text ) { * can just be called in `wp_trim_excerpt()`. * * @since 3.6.0 + * @deprecated 5.0.0 * * @param string $text Excerpt. * @return string */ function strip_dynamic_blocks_remove_filter( $text ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); + remove_filter( 'the_content', 'strip_dynamic_blocks', 6 ); return $text; } - add_filter( 'wp_trim_excerpt', 'strip_dynamic_blocks_remove_filter', 0 ); // Before all other. } diff --git a/lib/class-wp-block-type-registry.php b/lib/class-wp-block-type-registry.php deleted file mode 100644 index f95dec6ce4b9d1..00000000000000 --- a/lib/class-wp-block-type-registry.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php -/** - * Blocks API: WP_Block_Type_Registry class - * - * @package gutenberg - * @since 0.6.0 - */ - -/** - * Core class used for interacting with block types. - * - * @since 0.6.0 - */ -final class WP_Block_Type_Registry { - /** - * Registered block types, as `$name => $instance` pairs. - * - * @since 0.6.0 - * @access private - * @var WP_Block_Type[] - */ - private $registered_block_types = array(); - - /** - * Container for the main instance of the class. - * - * @since 0.6.0 - * @access private - * @static - * @var WP_Block_Type_Registry|null - */ - private static $instance = null; - - /** - * Registers a block type. - * - * @since 0.6.0 - * @access public - * - * @param string|WP_Block_Type $name Block type name including namespace, or alternatively a - * complete WP_Block_Type instance. In case a WP_Block_Type - * is provided, the $args parameter will be ignored. - * @param array $args { - * Optional. Array of block type arguments. Any arguments may be defined, however the - * ones described below are supported by default. Default empty array. - * - * @type callable $render_callback Callback used to render blocks of this block type. - * @type array $attributes Block attributes mapping, property name to schema. - * } - * @return WP_Block_Type|false The registered block type on success, or false on failure. - */ - public function register( $name, $args = array() ) { - $block_type = null; - if ( $name instanceof WP_Block_Type ) { - $block_type = $name; - $name = $block_type->name; - } - - if ( ! is_string( $name ) ) { - $message = __( 'Block type names must be strings.', 'gutenberg' ); - _doing_it_wrong( __METHOD__, $message, '0.1.0' ); - return false; - } - - if ( preg_match( '/[A-Z]+/', $name ) ) { - $message = __( 'Block type names must not contain uppercase characters.', 'gutenberg' ); - _doing_it_wrong( __METHOD__, $message, '1.5.0' ); - return false; - } - - $name_matcher = '/^[a-z0-9-]+\/[a-z0-9-]+$/'; - if ( ! preg_match( $name_matcher, $name ) ) { - $message = __( 'Block type names must contain a namespace prefix. Example: my-plugin/my-custom-block-type', 'gutenberg' ); - _doing_it_wrong( __METHOD__, $message, '0.1.0' ); - return false; - } - - if ( $this->is_registered( $name ) ) { - /* translators: 1: block name */ - $message = sprintf( __( 'Block type "%s" is already registered.', 'gutenberg' ), $name ); - _doing_it_wrong( __METHOD__, $message, '0.1.0' ); - return false; - } - - if ( ! $block_type ) { - $block_type = new WP_Block_Type( $name, $args ); - } - - $this->registered_block_types[ $name ] = $block_type; - - return $block_type; - } - - /** - * Unregisters a block type. - * - * @since 0.6.0 - * @access public - * - * @param string|WP_Block_Type $name Block type name including namespace, or alternatively a - * complete WP_Block_Type instance. - * @return WP_Block_Type|false The unregistered block type on success, or false on failure. - */ - public function unregister( $name ) { - if ( $name instanceof WP_Block_Type ) { - $name = $name->name; - } - - if ( ! $this->is_registered( $name ) ) { - /* translators: 1: block name */ - $message = sprintf( __( 'Block type "%s" is not registered.', 'gutenberg' ), $name ); - _doing_it_wrong( __METHOD__, $message, '0.1.0' ); - return false; - } - - $unregistered_block_type = $this->registered_block_types[ $name ]; - unset( $this->registered_block_types[ $name ] ); - - return $unregistered_block_type; - } - - /** - * Retrieves a registered block type. - * - * @since 0.6.0 - * @access public - * - * @param string $name Block type name including namespace. - * @return WP_Block_Type|null The registered block type, or null if it is not registered. - */ - public function get_registered( $name ) { - if ( ! $this->is_registered( $name ) ) { - return null; - } - - return $this->registered_block_types[ $name ]; - } - - /** - * Retrieves all registered block types. - * - * @since 0.6.0 - * @access public - * - * @return WP_Block_Type[] Associative array of `$block_type_name => $block_type` pairs. - */ - public function get_all_registered() { - return $this->registered_block_types; - } - - /** - * Checks if a block type is registered. - * - * @since 0.6.0 - * @access public - * - * @param string $name Block type name including namespace. - * @return bool True if the block type is registered, false otherwise. - */ - public function is_registered( $name ) { - return isset( $this->registered_block_types[ $name ] ); - } - - /** - * Utility method to retrieve the main instance of the class. - * - * The instance will be created if it does not exist yet. - * - * @since 0.6.0 - * @access public - * @static - * - * @return WP_Block_Type_Registry The main instance. - */ - public static function get_instance() { - if ( null === self::$instance ) { - self::$instance = new self(); - } - - return self::$instance; - } -} diff --git a/lib/class-wp-block-type.php b/lib/class-wp-block-type.php deleted file mode 100644 index c186eec88a0a3b..00000000000000 --- a/lib/class-wp-block-type.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php -/** - * Blocks API: WP_Block_Type class - * - * @package gutenberg - * @since 0.6.0 - */ - -/** - * Core class representing a block type. - * - * @since 0.6.0 - * - * @see register_block_type() - */ -class WP_Block_Type { - /** - * Block type key. - * - * @since 0.6.0 - * @var string - */ - public $name; - - /** - * Block type render callback. - * - * @since 0.6.0 - * @var callable - */ - public $render_callback; - - /** - * Block type attributes property schemas. - * - * @since 0.10.0 - * @var array - */ - public $attributes; - - /** - * Block type editor script handle. - * - * @since 2.0.0 - * @var string - */ - public $editor_script; - - /** - * Block type front end script handle. - * - * @since 2.0.0 - * @var string - */ - public $script; - - /** - * Block type editor style handle. - * - * @since 2.0.0 - * @var string - */ - public $editor_style; - - /** - * Block type front end style handle. - * - * @since 2.0.0 - * @var string - */ - public $style; - - /** - * Constructor. - * - * Will populate object properties from the provided arguments. - * - * @since 0.6.0 - * - * @see register_block_type() - * - * @param string $block_type Block type name including namespace. - * @param array|string $args Optional. Array or string of arguments for registering a block type. - * Default empty array. - */ - public function __construct( $block_type, $args = array() ) { - $this->name = $block_type; - - $this->set_props( $args ); - } - - /** - * Renders the block type output for given attributes. - * - * @since 0.6.0 - * - * @param array $attributes Optional. Block attributes. Default empty array. - * @param string $content Optional. Block content. Default empty string. - * @return string Rendered block type output. - */ - public function render( $attributes = array(), $content = '' ) { - if ( ! $this->is_dynamic() ) { - return ''; - } - - $attributes = $this->prepare_attributes_for_render( $attributes ); - - return (string) call_user_func( $this->render_callback, $attributes, $content ); - } - - /** - * Returns true if the block type is dynamic, or false otherwise. A dynamic - * block is one which defers its rendering to occur on-demand at runtime. - * - * @return boolean Whether block type is dynamic. - */ - public function is_dynamic() { - return is_callable( $this->render_callback ); - } - - /** - * Validates attributes against the current block schema, populating - * defaulted and missing values. - * - * @param array $attributes Original block attributes. - * @return array Prepared block attributes. - */ - public function prepare_attributes_for_render( $attributes ) { - // If there are no attribute definitions for the block type, skip - // processing and return vebatim. - if ( ! isset( $this->attributes ) ) { - return $attributes; - } - - foreach ( $attributes as $attribute_name => $value ) { - // If the attribute is not defined by the block type, it cannot be - // validated. - if ( ! isset( $this->attributes[ $attribute_name ] ) ) { - continue; - } - - $schema = $this->attributes[ $attribute_name ]; - - // Validate value by JSON schema. An invalid value should revert to - // its default, if one exists. This occurs by virtue of the missing - // attributes loop immediately following. If there is not a default - // assigned, the attribute value should remain unset. - $is_valid = rest_validate_value_from_schema( $value, $schema ); - if ( is_wp_error( $is_valid ) ) { - unset( $attributes[ $attribute_name ] ); - } - } - - // Populate values of any missing attributes for which the block type - // defines a default. - $missing_schema_attributes = array_diff_key( $this->attributes, $attributes ); - foreach ( $missing_schema_attributes as $attribute_name => $schema ) { - if ( isset( $schema['default'] ) ) { - $attributes[ $attribute_name ] = $schema['default']; - } - } - - return $attributes; - } - - /** - * Sets block type properties. - * - * @since 0.6.0 - * - * @param array|string $args Array or string of arguments for registering a block type. - */ - public function set_props( $args ) { - $args = wp_parse_args( - $args, - array( - 'render_callback' => null, - ) - ); - - $args['name'] = $this->name; - - foreach ( $args as $property_name => $property_value ) { - $this->$property_name = $property_value; - } - } - - /** - * Get all available block attributes including possible layout attribute from Columns block. - * - * @return array Array of attributes. - */ - public function get_attributes() { - return is_array( $this->attributes ) ? - array_merge( - $this->attributes, - array( - 'layout' => array( - 'type' => 'string', - ), - ) - ) : - array( - 'layout' => array( - 'type' => 'string', - ), - ); - } -} diff --git a/lib/load.php b/lib/load.php index ee1c973f99568a..034b3c9e83cebb 100644 --- a/lib/load.php +++ b/lib/load.php @@ -38,12 +38,6 @@ } require dirname( __FILE__ ) . '/meta-box-partial-page.php'; -if ( ! class_exists( 'WP_Block_Type' ) ) { - require dirname( __FILE__ ) . '/class-wp-block-type.php'; -} -if ( ! class_exists( 'WP_Block_Type_Registry' ) ) { - require dirname( __FILE__ ) . '/class-wp-block-type-registry.php'; -} require dirname( __FILE__ ) . '/blocks.php'; require dirname( __FILE__ ) . '/client-assets.php'; require dirname( __FILE__ ) . '/compat.php'; diff --git a/phpunit/class-blocks-api-test.php b/phpunit/class-blocks-api-test.php index 2c91bb027a92aa..1573f980f63683 100644 --- a/phpunit/class-blocks-api-test.php +++ b/phpunit/class-blocks-api-test.php @@ -82,6 +82,9 @@ function tearDown() { * @covers ::strip_dynamic_blocks */ function test_strip_dynamic_blocks() { + $this->setExpectedDeprecated( 'strip_dynamic_blocks' ); + $this->setExpectedDeprecated( 'get_dynamic_blocks_regex' ); + // Simple dynamic block.. $content = '<!-- wp:core/block /-->'; $this->assertEmpty( strip_dynamic_blocks( $content ) ); @@ -89,30 +92,4 @@ function test_strip_dynamic_blocks() { // Dynamic block with options, embedded in other content. $this->assertEquals( $this->filtered_content, strip_dynamic_blocks( $this->content ) ); } - - /** - * Tests that dynamic blocks don't cause an out-of-memory error. - * - * When dynamic blocks happen to generate an excerpt, they can cause an - * infinite loop if that block is part of the post's content. - * - * `wp_trim_excerpt()` applies the `the_content` filter, which has - * `do_blocks` attached to it, trying to render the block which again will - * attempt to return an excerpt of that post. - * - * This infinite loop can be avoided by stripping dynamic blocks before - * `the_content` gets applied, just like shortcodes. - * - * @covers ::strip_dynamic_blocks_add_filter, ::strip_dynamic_blocks_remove_filter - */ - function test_excerpt_infinite_loop() { - $query = new WP_Query( - array( - 'post__in' => array( self::$post_id ), - ) - ); - $query->the_post(); - - $this->assertEmpty( do_blocks( '<!-- wp:core/dummy /-->' ) ); - } } From 0f5891556e8e3ec3e41fcc318533bba87983338b Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Wed, 23 Jan 2019 11:39:24 -0500 Subject: [PATCH 45/56] Framework: Remove 5.0-merged REST API integrations (#13408) * Plugin: Remove 5.0-merged REST API integrations * Re-add line break to deprecations document --- .../backward-compatibility/deprecations.md | 9 + lib/class-wp-rest-autosaves-controller.php | 426 ------------ ...lass-wp-rest-block-renderer-controller.php | 178 ------ lib/class-wp-rest-blocks-controller.php | 89 --- lib/class-wp-rest-post-search-handler.php | 190 ------ lib/class-wp-rest-search-controller.php | 363 ----------- lib/class-wp-rest-search-handler.php | 96 --- lib/class-wp-rest-themes-controller.php | 237 ------- lib/load.php | 22 - lib/rest-api.php | 211 +----- phpunit/bootstrap.php | 1 - phpunit/class-gutenberg-rest-api-test.php | 427 ------------ .../class-rest-autosaves-controller-test.php | 605 ------------------ .../class-wp-rest-dummy-search-handler.php | 90 --- .../class-wp-rest-themes-controller-test.php | 344 ---------- 15 files changed, 36 insertions(+), 3252 deletions(-) delete mode 100644 lib/class-wp-rest-autosaves-controller.php delete mode 100644 lib/class-wp-rest-block-renderer-controller.php delete mode 100644 lib/class-wp-rest-blocks-controller.php delete mode 100644 lib/class-wp-rest-post-search-handler.php delete mode 100644 lib/class-wp-rest-search-controller.php delete mode 100644 lib/class-wp-rest-search-handler.php delete mode 100644 lib/class-wp-rest-themes-controller.php delete mode 100644 phpunit/class-gutenberg-rest-api-test.php delete mode 100644 phpunit/class-rest-autosaves-controller-test.php delete mode 100644 phpunit/class-wp-rest-dummy-search-handler.php delete mode 100644 phpunit/class-wp-rest-themes-controller-test.php diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 6db2ed322b6a5b..85e82f25549c67 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -12,6 +12,15 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `strip_dynamic_blocks_remove_filter` has been removed. - The PHP function `gutenberg_post_has_blocks` has been removed. Use [`has_blocks`](https://developer.wordpress.org/reference/functions/has_blocks/) instead. - The PHP function `gutenberg_content_has_blocks` has been removed. Use [`has_blocks`](https://developer.wordpress.org/reference/functions/has_blocks/) instead. +- The PHP function `gutenberg_register_rest_routes` has been removed. +- The PHP function `gutenberg_add_taxonomy_visibility_field` has been removed. +- The PHP function `gutenberg_get_taxonomy_visibility_data` has been removed. +- The PHP function `gutenberg_add_permalink_template_to_posts` has been removed. +- The PHP function `gutenberg_add_block_format_to_post_content` has been removed. +- The PHP function `gutenberg_add_target_schema_to_links` has been removed. +- The PHP function `gutenberg_register_post_prepare_functions` has been removed. +- The PHP function `gutenberg_silence_rest_errors` has been removed. +- The PHP function `gutenberg_filter_post_type_labels` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/lib/class-wp-rest-autosaves-controller.php b/lib/class-wp-rest-autosaves-controller.php deleted file mode 100644 index 6f6496c35790e3..00000000000000 --- a/lib/class-wp-rest-autosaves-controller.php +++ /dev/null @@ -1,426 +0,0 @@ -<?php -/** - * REST API: WP_REST_Autosaves_Controller class. - * - * @package WordPress - * @subpackage REST_API - * @since 5.0.0 - */ - -/** - * Core class used to access autosaves via the REST API. - * - * @since 5.0.0 - * - * @see WP_REST_Controller - */ -class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller { - - /** - * Parent post type. - * - * @since 5.0.0 - * @var string - */ - private $parent_post_type; - - /** - * Parent post controller. - * - * @since 5.0.0 - * @var WP_REST_Controller - */ - private $parent_controller; - - /** - * Revision controller. - * - * @since 5.0.0 - * @var WP_REST_Controller - */ - private $revisions_controller; - - /** - * The base of the parent controller's route. - * - * @since 5.0.0 - * @var string - */ - private $parent_base; - - /** - * Constructor. - * - * @since 5.0.0 - * - * @param string $parent_post_type Post type of the parent. - */ - public function __construct( $parent_post_type ) { - $this->parent_post_type = $parent_post_type; - $post_type_object = get_post_type_object( $parent_post_type ); - - // Ensure that post type-specific controller logic is available. - $parent_controller_class = ! empty( $post_type_object->rest_controller_class ) ? $post_type_object->rest_controller_class : 'WP_REST_Posts_Controller'; - - $this->parent_controller = new $parent_controller_class( $post_type_object->name ); - $this->revisions_controller = new WP_REST_Revisions_Controller( $parent_post_type ); - $this->rest_namespace = 'wp/v2'; - $this->rest_base = 'autosaves'; - $this->parent_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name; - } - - /** - * Registers routes for autosaves. - * - * @since 5.0.0 - * - * @see register_rest_route() - */ - public function register_routes() { - register_rest_route( - $this->rest_namespace, - '/' . $this->parent_base . '/(?P<id>[\d]+)/' . $this->rest_base, - array( - 'args' => array( - 'parent' => array( - 'description' => __( 'The ID for the parent of the object.', 'gutenberg' ), - 'type' => 'integer', - ), - ), - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_items' ), - 'permission_callback' => array( $this, 'get_items_permissions_check' ), - 'args' => $this->get_collection_params(), - ), - array( - 'methods' => WP_REST_Server::CREATABLE, - 'callback' => array( $this, 'create_item' ), - 'permission_callback' => array( $this, 'create_item_permissions_check' ), - 'args' => $this->parent_controller->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ), - ), - 'schema' => array( $this, 'get_public_item_schema' ), - ) - ); - - register_rest_route( - $this->rest_namespace, - '/' . $this->parent_base . '/(?P<parent>[\d]+)/' . $this->rest_base . '/(?P<id>[\d]+)', - array( - 'args' => array( - 'parent' => array( - 'description' => __( 'The ID for the parent of the object.', 'gutenberg' ), - 'type' => 'integer', - ), - 'id' => array( - 'description' => __( 'The ID for the object.', 'gutenberg' ), - 'type' => 'integer', - ), - ), - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_item' ), - 'permission_callback' => array( $this->revisions_controller, 'get_item_permissions_check' ), - 'args' => array( - 'context' => $this->get_context_param( array( 'default' => 'view' ) ), - ), - ), - 'schema' => array( $this, 'get_public_item_schema' ), - ) - ); - - } - - /** - * Get the parent post. - * - * @since 5.0.0 - * - * @param int $parent_id Supplied ID. - * @return WP_Post|WP_Error Post object if ID is valid, WP_Error otherwise. - */ - protected function get_parent( $parent_id ) { - return $this->revisions_controller->get_parent( $parent_id ); - } - - /** - * Checks if a given request has access to get autosaves. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full data about the request. - * @return true|WP_Error True if the request has read access, WP_Error object otherwise. - */ - public function get_items_permissions_check( $request ) { - $parent = $this->get_parent( $request['id'] ); - if ( is_wp_error( $parent ) ) { - return $parent; - } - - $parent_post_type_obj = get_post_type_object( $parent->post_type ); - if ( ! current_user_can( $parent_post_type_obj->cap->edit_post, $parent->ID ) ) { - return new WP_Error( 'rest_cannot_read', __( 'Sorry, you are not allowed to view revisions of this post.', 'gutenberg' ), array( 'status' => rest_authorization_required_code() ) ); - } - - return true; - } - - /** - * Checks if a given request has access to create an autosave revision. - * - * Autosave revisions inherit permissions from the parent post, - * check if the current user has permission to edit the post. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return true|WP_Error True if the request has access to create the item, WP_Error object otherwise. - */ - public function create_item_permissions_check( $request ) { - $id = $request->get_param( 'id' ); - if ( empty( $id ) ) { - return new WP_Error( 'rest_post_invalid_id', __( 'Invalid item ID.', 'gutenberg' ), array( 'status' => 404 ) ); - } - - return $this->parent_controller->update_item_permissions_check( $request ); - } - - /** - * Creates, updates or deletes an autosave revision. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. - */ - public function create_item( $request ) { - - if ( ! defined( 'DOING_AUTOSAVE' ) ) { - define( 'DOING_AUTOSAVE', true ); - } - - $post = get_post( $request['id'] ); - - if ( is_wp_error( $post ) ) { - return $post; - } - - $prepared_post = $this->parent_controller->prepare_item_for_database( $request ); - $prepared_post->ID = $post->ID; - $user_id = get_current_user_id(); - - if ( ( 'draft' === $post->post_status || 'auto-draft' === $post->post_status ) && $post->post_author == $user_id ) { - // Draft posts for the same author: autosaving updates the post and does not create a revision. - // Convert the post object to an array and add slashes, wp_update_post expects escaped array. - $autosave_id = wp_update_post( wp_slash( (array) $prepared_post ), true ); - } else { - // Non-draft posts: create or update the post autosave. - $autosave_id = $this->create_post_autosave( (array) $prepared_post ); - } - - if ( is_wp_error( $autosave_id ) ) { - return $autosave_id; - } - - $autosave = get_post( $autosave_id ); - $request->set_param( 'context', 'edit' ); - - $response = $this->prepare_item_for_response( $autosave, $request ); - $response = rest_ensure_response( $response ); - - return $response; - } - - /** - * Get the autosave, if the ID is valid. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full data about the request. - * @return WP_Post|WP_Error Revision post object if ID is valid, WP_Error otherwise. - */ - public function get_item( $request ) { - $parent_id = (int) $request->get_param( 'parent' ); - - if ( $parent_id <= 0 ) { - return new WP_Error( 'rest_post_invalid_id', __( 'Invalid parent post ID.', 'gutenberg' ), array( 'status' => 404 ) ); - } - - $autosave = wp_get_post_autosave( $parent_id ); - - if ( ! $autosave ) { - return new WP_Error( 'rest_post_no_autosave', __( 'There is no autosave revision for this post.', 'gutenberg' ), array( 'status' => 404 ) ); - } - - $response = $this->prepare_item_for_response( $autosave, $request ); - return $response; - } - - /** - * Gets a collection of autosaves using wp_get_post_autosave. - * - * Contains the user's autosave, for empty if it doesn't exist. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full data about the request. - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. - */ - public function get_items( $request ) { - $parent = $this->get_parent( $request['id'] ); - if ( is_wp_error( $parent ) ) { - return $parent; - } - - $response = array(); - $parent_id = $parent->ID; - $revisions = wp_get_post_revisions( $parent_id, array( 'check_enabled' => false ) ); - - foreach ( $revisions as $revision ) { - if ( false !== strpos( $revision->post_name, "{$parent_id}-autosave" ) ) { - $data = $this->prepare_item_for_response( $revision, $request ); - $response[] = $this->prepare_response_for_collection( $data ); - } - } - - return rest_ensure_response( $response ); - } - - - /** - * Retrieves the autosave's schema, conforming to JSON Schema. - * - * @since 5.0.0 - * - * @return array Item schema data. - */ - public function get_item_schema() { - $schema = $this->revisions_controller->get_item_schema(); - - $schema['properties']['preview_link'] = array( - 'description' => __( 'Preview link for the post.', 'gutenberg' ), - 'type' => 'string', - 'format' => 'uri', - 'context' => array( 'edit' ), - 'readonly' => true, - ); - - return $schema; - } - - /** - * Creates autosave for the specified post. - * - * From wp-admin/post.php. - * - * @since 5.0.0 - * - * @param mixed $post_data Associative array containing the post data. - * @return mixed The autosave revision ID or WP_Error. - */ - public function create_post_autosave( $post_data ) { - - $post_id = (int) $post_data['ID']; - $post = get_post( $post_id ); - - if ( is_wp_error( $post ) ) { - return $post; - } - - $user_id = get_current_user_id(); - - // Store one autosave per author. If there is already an autosave, overwrite it. - $old_autosave = wp_get_post_autosave( $post_id, $user_id ); - - if ( $old_autosave ) { - $new_autosave = _wp_post_revision_data( $post_data, true ); - $new_autosave['ID'] = $old_autosave->ID; - $new_autosave['post_author'] = $user_id; - - // If the new autosave has the same content as the post, delete the autosave. - $autosave_is_different = false; - - foreach ( array_intersect( array_keys( $new_autosave ), array_keys( _wp_post_revision_fields( $post ) ) ) as $field ) { - if ( normalize_whitespace( $new_autosave[ $field ] ) != normalize_whitespace( $post->$field ) ) { - $autosave_is_different = true; - break; - } - } - - if ( ! $autosave_is_different ) { - wp_delete_post_revision( $old_autosave->ID ); - return new WP_Error( 'rest_autosave_no_changes', __( 'There is nothing to save. The autosave and the post content are the same.', 'gutenberg' ), array( 'status' => 400 ) ); - } - - /** - * This filter is documented in wp-admin/post.php. - */ - do_action( 'wp_creating_autosave', $new_autosave ); - - // wp_update_post expects escaped array. - return wp_update_post( wp_slash( $new_autosave ) ); - } - - // Create the new autosave as a special post revision. - return _wp_put_post_revision( $post_data, true ); - } - - /** - * Prepares the revision for the REST response. - * - * @since 5.0.0 - * - * @param WP_Post $post Post revision object. - * @param WP_REST_Request $request Request object. - * - * @return WP_REST_Response Response object. - */ - public function prepare_item_for_response( $post, $request ) { - - $response = $this->revisions_controller->prepare_item_for_response( $post, $request ); - - $schema = $this->get_item_schema(); - - if ( ! empty( $schema['properties']['preview_link'] ) ) { - $parent_id = wp_is_post_autosave( $post ); - $preview_post_id = false === $parent_id ? $post->ID : $parent_id; - $preview_query_args = array(); - - if ( false !== $parent_id ) { - $preview_query_args['preview_id'] = $parent_id; - $preview_query_args['preview_nonce'] = wp_create_nonce( 'post_preview_' . $parent_id ); - } - - $response->data['preview_link'] = get_preview_post_link( $preview_post_id, $preview_query_args ); - } - - $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; - $response->data = $this->filter_response_by_context( $response->data, $context ); - - /** - * Filters a revision returned from the API. - * - * Allows modification of the revision right before it is returned. - * - * @since 5.0.0 - * - * @param WP_REST_Response $response The response object. - * @param WP_Post $post The original revision object. - * @param WP_REST_Request $request Request used to generate the response. - */ - return apply_filters( 'rest_prepare_autosave', $response, $post, $request ); - } - - /** - * Retrieves the query params for the autosaves collection. - * - * @since 5.0.0 - * - * @return array Collection parameters. - */ - public function get_collection_params() { - return array( - 'context' => $this->get_context_param( array( 'default' => 'view' ) ), - ); - } -} diff --git a/lib/class-wp-rest-block-renderer-controller.php b/lib/class-wp-rest-block-renderer-controller.php deleted file mode 100644 index b9839f080376a2..00000000000000 --- a/lib/class-wp-rest-block-renderer-controller.php +++ /dev/null @@ -1,178 +0,0 @@ -<?php -/** - * Block Renderer REST API: WP_REST_Block_Renderer_Controller class - * - * @package gutenberg - * @since 2.8.0 - */ - -/** - * Controller which provides REST endpoint for rendering a block. - * - * @since 2.8.0 - * - * @see WP_REST_Controller - */ -class WP_REST_Block_Renderer_Controller extends WP_REST_Controller { - - /** - * Constructs the controller. - * - * @access public - */ - public function __construct() { - $this->namespace = 'wp/v2'; - $this->rest_base = 'block-renderer'; - } - - /** - * Registers the necessary REST API routes, one for each dynamic block. - * - * @access public - */ - public function register_routes() { - $block_types = WP_Block_Type_Registry::get_instance()->get_all_registered(); - foreach ( $block_types as $block_type ) { - if ( ! $block_type->is_dynamic() ) { - continue; - } - - register_rest_route( - $this->namespace, - '/' . $this->rest_base . '/(?P<name>' . $block_type->name . ')', - array( - 'args' => array( - 'name' => array( - 'description' => __( 'Unique registered name for the block.', 'gutenberg' ), - 'type' => 'string', - ), - ), - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_item' ), - 'permission_callback' => array( $this, 'get_item_permissions_check' ), - 'args' => array( - 'context' => $this->get_context_param( array( 'default' => 'view' ) ), - 'attributes' => array( - /* translators: %s is the name of the block */ - 'description' => sprintf( __( 'Attributes for %s block', 'gutenberg' ), $block_type->name ), - 'type' => 'object', - 'additionalProperties' => false, - 'properties' => $block_type->get_attributes(), - 'default' => array(), - ), - 'post_id' => array( - 'description' => __( 'ID of the post context.', 'gutenberg' ), - 'type' => 'integer', - ), - ), - ), - 'schema' => array( $this, 'get_public_item_schema' ), - ) - ); - } - } - - /** - * Checks if a given request has access to read blocks. - * - * @since 2.8.0 - * @access public - * - * @param WP_REST_Request $request Request. - * @return true|WP_Error True if the request has read access, WP_Error object otherwise. - */ - public function get_item_permissions_check( $request ) { - global $post; - - $post_id = isset( $request['post_id'] ) ? intval( $request['post_id'] ) : 0; - - if ( 0 < $post_id ) { - $post = get_post( $post_id ); - if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { - return new WP_Error( - 'gutenberg_block_cannot_read', - __( 'Sorry, you are not allowed to read Gutenberg blocks of this post.', 'gutenberg' ), - array( - 'status' => rest_authorization_required_code(), - ) - ); - } - } else { - if ( ! current_user_can( 'edit_posts' ) ) { - return new WP_Error( - 'gutenberg_block_cannot_read', - __( 'Sorry, you are not allowed to read Gutenberg blocks as this user.', 'gutenberg' ), - array( - 'status' => rest_authorization_required_code(), - ) - ); - } - } - - return true; - } - - /** - * Returns block output from block's registered render_callback. - * - * @since 2.8.0 - * @access public - * - * @param WP_REST_Request $request Full details about the request. - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. - */ - public function get_item( $request ) { - global $post; - - $post_id = isset( $request['post_id'] ) ? intval( $request['post_id'] ) : 0; - - if ( 0 < $post_id ) { - $post = get_post( $post_id ); - - // Set up postdata since this will be needed if post_id was set. - setup_postdata( $post ); - } - $registry = WP_Block_Type_Registry::get_instance(); - $block = $registry->get_registered( $request['name'] ); - - if ( null === $block ) { - return new WP_Error( - 'gutenberg_block_invalid', - __( 'Invalid block.', 'gutenberg' ), - array( - 'status' => 404, - ) - ); - } - - $data = array( - 'rendered' => $block->render( $request->get_param( 'attributes' ) ), - ); - return rest_ensure_response( $data ); - } - - /** - * Retrieves block's output schema, conforming to JSON Schema. - * - * @since 2.8.0 - * @access public - * - * @return array Item schema data. - */ - public function get_item_schema() { - return array( - '$schema' => 'http://json-schema.org/schema#', - 'title' => 'rendered-block', - 'type' => 'object', - 'properties' => array( - 'rendered' => array( - 'description' => __( 'The rendered block.', 'gutenberg' ), - 'type' => 'string', - 'required' => true, - 'context' => array( 'edit' ), - ), - ), - ); - } -} diff --git a/lib/class-wp-rest-blocks-controller.php b/lib/class-wp-rest-blocks-controller.php deleted file mode 100644 index 47882fafbff042..00000000000000 --- a/lib/class-wp-rest-blocks-controller.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * Reusable blocks REST API: WP_REST_Blocks_Controller class - * - * @package gutenberg - * @since 0.10.0 - */ - -/** - * Controller which provides a REST endpoint for Gutenberg to read, create, - * edit and delete reusable blocks. Blocks are stored as posts with the wp_block - * post type. - * - * @since 0.10.0 - * - * @see WP_REST_Controller - */ -class WP_REST_Blocks_Controller extends WP_REST_Posts_Controller { - /** - * Checks if a block can be read. - * - * @since 2.1.0 - * - * @param object $post Post object that backs the block. - * @return bool Whether the block can be read. - */ - public function check_read_permission( $post ) { - // Ensure that the user is logged in and has the read_blocks capability. - $post_type = get_post_type_object( $post->post_type ); - if ( ! current_user_can( $post_type->cap->read_post, $post->ID ) ) { - return false; - } - - return parent::check_read_permission( $post ); - } - - /** - * Filters a response based on the context defined in the schema. - * - * @since 4.4.0 - * - * @param array $data Response data to fiter. - * @param string $context Context defined in the schema. - * @return array Filtered response. - */ - public function filter_response_by_context( $data, $context ) { - $data = parent::filter_response_by_context( $data, $context ); - - /* - * Remove `title.rendered` and `content.rendered` from the response. It - * doesn't make sense for a reusable block to have rendered content on its - * own, since rendering a block requires it to be inside a post or a page. - */ - unset( $data['title']['rendered'] ); - unset( $data['content']['rendered'] ); - - return $data; - } - - /** - * Retrieves the block's schema, conforming to JSON Schema. - * - * @since 4.4.0 - * - * @return array Item schema data. - */ - public function get_item_schema() { - $schema = parent::get_item_schema(); - - /* - * Allow all contexts to access `title.raw` and `content.raw`. Clients always - * need the raw markup of a reusable block to do anything useful, e.g. parse - * it or display it in an editor. - */ - $schema['properties']['title']['properties']['raw']['context'] = array( 'view', 'edit' ); - $schema['properties']['content']['properties']['raw']['context'] = array( 'view', 'edit' ); - - /* - * Remove `title.rendered` and `content.rendered` from the schema. It doesn’t - * make sense for a reusable block to have rendered content on its own, since - * rendering a block requires it to be inside a post or a page. - */ - unset( $schema['properties']['title']['properties']['rendered'] ); - unset( $schema['properties']['content']['properties']['rendered'] ); - - return $schema; - } - -} diff --git a/lib/class-wp-rest-post-search-handler.php b/lib/class-wp-rest-post-search-handler.php deleted file mode 100644 index 64d19174320121..00000000000000 --- a/lib/class-wp-rest-post-search-handler.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -/** - * REST API: WP_REST_Post_Search_Handler class - * - * @package gutenberg - * @since 3.3.0 - */ - -/** - * Core class representing a search handler for posts in the REST API. - * - * @since 3.3.0 - */ -class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler { - - /** - * Constructor. - * - * @since 3.3.0 - */ - public function __construct() { - $this->type = 'post'; - - // Support all public post types except attachments. - $this->subtypes = array_diff( - array_values( - get_post_types( - array( - 'public' => true, - 'show_in_rest' => true, - ), - 'names' - ) - ), - array( 'attachment' ) - ); - } - - /** - * Searches the object type content for a given search request. - * - * @since 3.3.0 - * - * @param WP_REST_Request $request Full REST request. - * @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing - * an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the - * total count for the matching search results. - */ - public function search_items( WP_REST_Request $request ) { - - // Get the post types to search for the current request. - $post_types = $request[ WP_REST_Search_Controller::PROP_SUBTYPE ]; - if ( in_array( WP_REST_Search_Controller::TYPE_ANY, $post_types, true ) ) { - $post_types = $this->subtypes; - } - - $query_args = array( - 'post_type' => $post_types, - 'post_status' => 'publish', - 'paged' => (int) $request['page'], - 'posts_per_page' => (int) $request['per_page'], - 'ignore_sticky_posts' => true, - 'fields' => 'ids', - ); - - if ( ! empty( $request['search'] ) ) { - $query_args['s'] = $request['search']; - } - - $query = new WP_Query(); - $found_ids = $query->query( $query_args ); - $total = $query->found_posts; - - return array( - self::RESULT_IDS => $found_ids, - self::RESULT_TOTAL => $total, - ); - } - - /** - * Prepares the search result for a given ID. - * - * @since 3.3.0 - * - * @param int $id Item ID. - * @param array $fields Fields to include for the item. - * @return array Associative array containing all fields for the item. - */ - public function prepare_item( $id, array $fields ) { - $post = get_post( $id ); - - $data = array(); - - if ( in_array( WP_REST_Search_Controller::PROP_ID, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_ID ] = (int) $post->ID; - } - - if ( in_array( WP_REST_Search_Controller::PROP_TITLE, $fields, true ) ) { - if ( post_type_supports( $post->post_type, 'title' ) ) { - add_filter( 'protected_title_format', array( $this, 'protected_title_format' ) ); - $data[ WP_REST_Search_Controller::PROP_TITLE ] = get_the_title( $post->ID ); - remove_filter( 'protected_title_format', array( $this, 'protected_title_format' ) ); - } else { - $data[ WP_REST_Search_Controller::PROP_TITLE ] = ''; - } - } - - if ( in_array( WP_REST_Search_Controller::PROP_URL, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_URL ] = get_permalink( $post->ID ); - } - - if ( in_array( WP_REST_Search_Controller::PROP_TYPE, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_TYPE ] = $this->type; - } - - if ( in_array( WP_REST_Search_Controller::PROP_SUBTYPE, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_SUBTYPE ] = $post->post_type; - } - - return $data; - } - - /** - * Prepares links for the search result of a given ID. - * - * @since 3.3.0 - * - * @param int $id Item ID. - * @return array Links for the given item. - */ - public function prepare_item_links( $id ) { - $post = get_post( $id ); - - $links = array(); - - $item_route = $this->detect_rest_item_route( $post ); - if ( ! empty( $item_route ) ) { - $links['self'] = array( - 'href' => rest_url( $item_route ), - 'embeddable' => true, - ); - } - - $links['about'] = array( - 'href' => rest_url( 'wp/v2/types/' . $post->post_type ), - ); - - return $links; - } - - /** - * Overwrites the default protected title format. - * - * By default, WordPress will show password protected posts with a title of - * "Protected: %s". As the REST API communicates the protected status of a post - * in a machine readable format, we remove the "Protected: " prefix. - * - * @since 3.3.0 - * - * @return string Protected title format. - */ - public function protected_title_format() { - return '%s'; - } - - /** - * Attempts to detect the route to access a single item. - * - * @since 3.3.0 - * - * @param WP_Post $post Post object. - * @return string REST route relative to the REST base URI, or empty string if unknown. - */ - protected function detect_rest_item_route( $post ) { - $post_type = get_post_type_object( $post->post_type ); - if ( ! $post_type ) { - return ''; - } - - // It's currently impossible to detect the REST URL from a custom controller. - if ( ! empty( $post_type->rest_controller_class ) && 'WP_REST_Posts_Controller' !== $post_type->rest_controller_class ) { - return ''; - } - - $namespace = 'wp/v2'; - $rest_base = ! empty( $post_type->rest_base ) ? $post_type->rest_base : $post_type->name; - - return sprintf( '%s/%s/%d', $namespace, $rest_base, $post->ID ); - } -} diff --git a/lib/class-wp-rest-search-controller.php b/lib/class-wp-rest-search-controller.php deleted file mode 100644 index 69776c5a7be342..00000000000000 --- a/lib/class-wp-rest-search-controller.php +++ /dev/null @@ -1,363 +0,0 @@ -<?php -/** - * REST API: WP_REST_Search_Controller class - * - * @package gutenberg - * @since 3.3.0 - */ - -/** - * Core class to search through all WordPress content via the REST API. - * - * @since 3.3.0 - * - * @see WP_REST_Controller - */ -class WP_REST_Search_Controller extends WP_REST_Controller { - - /** - * ID property name. - */ - const PROP_ID = 'id'; - - /** - * Title property name. - */ - const PROP_TITLE = 'title'; - - /** - * URL property name. - */ - const PROP_URL = 'url'; - - /** - * Type property name. - */ - const PROP_TYPE = 'type'; - - /** - * Subtype property name. - */ - const PROP_SUBTYPE = 'subtype'; - - /** - * Identifier for the 'any' type. - */ - const TYPE_ANY = 'any'; - - /** - * Search handlers used by the controller. - * - * @since 3.3.0 - * @var array - */ - protected $search_handlers = array(); - - /** - * Constructor. - * - * @since 3.3.0 - * - * @param array $search_handlers List of search handlers to use in the controller. Each search - * handler instance must extend the `WP_REST_Search_Handler` class. - */ - public function __construct( array $search_handlers ) { - $this->namespace = 'wp/v2'; - $this->rest_base = 'search'; - - foreach ( $search_handlers as $search_handler ) { - if ( ! $search_handler instanceof WP_REST_Search_Handler ) { - - /* translators: %s: PHP class name */ - _doing_it_wrong( __METHOD__, sprintf( __( 'REST search handlers must extend the %s class.', 'gutenberg' ), 'WP_REST_Search_Handler' ), '3.3.0' ); - continue; - } - - $this->search_handlers[ $search_handler->get_type() ] = $search_handler; - } - } - - /** - * Registers the routes for the objects of the controller. - * - * @since 3.3.0 - * - * @see register_rest_route() - */ - public function register_routes() { - register_rest_route( - $this->namespace, - '/' . $this->rest_base, - array( - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_items' ), - 'permission_callback' => array( $this, 'get_items_permission_check' ), - 'args' => $this->get_collection_params(), - ), - 'schema' => array( $this, 'get_public_item_schema' ), - ) - ); - } - - /** - * Checks if a given request has access to search content. - * - * @since 3.3.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return true|WP_Error True if the request has search access, WP_Error object otherwise. - */ - public function get_items_permission_check( $request ) { - return true; - } - - /** - * Retrieves a collection of search results. - * - * @since 3.3.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. - */ - public function get_items( $request ) { - $handler = $this->get_search_handler( $request ); - if ( is_wp_error( $handler ) ) { - return $handler; - } - - $result = $handler->search_items( $request ); - - if ( ! isset( $result[ WP_REST_Search_Handler::RESULT_IDS ] ) || ! is_array( $result[ WP_REST_Search_Handler::RESULT_IDS ] ) || ! isset( $result[ WP_REST_Search_Handler::RESULT_TOTAL ] ) ) { - return new WP_Error( 'rest_search_handler_error', __( 'Internal search handler error.', 'gutenberg' ), array( 'status' => 500 ) ); - } - - $ids = array_map( 'absint', $result[ WP_REST_Search_Handler::RESULT_IDS ] ); - - $results = array(); - foreach ( $ids as $id ) { - $data = $this->prepare_item_for_response( $id, $request ); - $results[] = $this->prepare_response_for_collection( $data ); - } - - $total = (int) $result[ WP_REST_Search_Handler::RESULT_TOTAL ]; - $page = (int) $request['page']; - $per_page = (int) $request['per_page']; - $max_pages = ceil( $total / $per_page ); - - if ( $page > $max_pages && $total > 0 ) { - return new WP_Error( 'rest_search_invalid_page_number', __( 'The page number requested is larger than the number of pages available.', 'gutenberg' ), array( 'status' => 400 ) ); - } - - $response = rest_ensure_response( $results ); - $response->header( 'X-WP-Total', $total ); - $response->header( 'X-WP-TotalPages', $max_pages ); - - $request_params = $request->get_query_params(); - $base = add_query_arg( $request_params, rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ) ); - - if ( $page > 1 ) { - $prev_link = add_query_arg( 'page', $page - 1, $base ); - $response->link_header( 'prev', $prev_link ); - } - if ( $page < $max_pages ) { - $next_link = add_query_arg( 'page', $page + 1, $base ); - $response->link_header( 'next', $next_link ); - } - - return $response; - } - - /** - * Prepares a single search result for response. - * - * @since 3.3.0 - * - * @param int $id ID of the item to prepare. - * @param WP_REST_Request $request Request object. - * @return WP_REST_Response Response object. - */ - public function prepare_item_for_response( $id, $request ) { - $handler = $this->get_search_handler( $request ); - if ( is_wp_error( $handler ) ) { - return new WP_REST_Response(); - } - - if ( method_exists( $this, 'get_fields_for_response' ) ) { - $fields = $this->get_fields_for_response( $request ); - } else { - $schema = $this->get_item_schema(); - $fields = array_keys( $schema['properties'] ); - } - - $data = $handler->prepare_item( $id, $fields ); - $data = $this->add_additional_fields_to_object( $data, $request ); - - $context = ! empty( $request['context'] ) ? $request['context'] : 'view'; - $data = $this->filter_response_by_context( $data, $context ); - - $response = rest_ensure_response( $data ); - - $links = $handler->prepare_item_links( $id ); - $links['collection'] = array( - 'href' => rest_url( sprintf( '%s/%s', $this->namespace, $this->rest_base ) ), - ); - $response->add_links( $links ); - - return $response; - } - - /** - * Retrieves the item schema, conforming to JSON Schema. - * - * @since 3.3.0 - * - * @return array Item schema data. - */ - public function get_item_schema() { - $types = array(); - $subtypes = array(); - foreach ( $this->search_handlers as $search_handler ) { - $types[] = $search_handler->get_type(); - $subtypes = array_merge( $subtypes, $search_handler->get_subtypes() ); - } - - $types = array_unique( $types ); - $subtypes = array_unique( $subtypes ); - - $schema = array( - '$schema' => 'http://json-schema.org/draft-04/schema#', - 'title' => 'search-result', - 'type' => 'object', - 'properties' => array( - self::PROP_ID => array( - 'description' => __( 'Unique identifier for the object.', 'gutenberg' ), - 'type' => 'integer', - 'context' => array( 'view', 'embed' ), - 'readonly' => true, - ), - self::PROP_TITLE => array( - 'description' => __( 'The title for the object.', 'gutenberg' ), - 'type' => 'string', - 'context' => array( 'view', 'embed' ), - 'readonly' => true, - ), - self::PROP_URL => array( - 'description' => __( 'URL to the object.', 'gutenberg' ), - 'type' => 'string', - 'format' => 'uri', - 'context' => array( 'view', 'embed' ), - 'readonly' => true, - ), - self::PROP_TYPE => array( - 'description' => __( 'Object type.', 'gutenberg' ), - 'type' => 'string', - 'enum' => $types, - 'context' => array( 'view', 'embed' ), - 'readonly' => true, - ), - self::PROP_SUBTYPE => array( - 'description' => __( 'Object subtype.', 'gutenberg' ), - 'type' => 'string', - 'enum' => $subtypes, - 'context' => array( 'view', 'embed' ), - 'readonly' => true, - ), - ), - ); - - return $this->add_additional_fields_schema( $schema ); - } - - /** - * Retrieves the query params for the search results collection. - * - * @since 3.3.0 - * - * @return array Collection parameters. - */ - public function get_collection_params() { - $types = array(); - $subtypes = array(); - foreach ( $this->search_handlers as $search_handler ) { - $types[] = $search_handler->get_type(); - $subtypes = array_merge( $subtypes, $search_handler->get_subtypes() ); - } - - $types = array_unique( $types ); - $subtypes = array_unique( $subtypes ); - - $query_params = parent::get_collection_params(); - - $query_params['context']['default'] = 'view'; - - $query_params[ self::PROP_TYPE ] = array( - 'default' => $types[0], - 'description' => __( 'Limit results to items of an object type.', 'gutenberg' ), - 'type' => 'string', - 'enum' => $types, - ); - - $query_params[ self::PROP_SUBTYPE ] = array( - 'default' => self::TYPE_ANY, - 'description' => __( 'Limit results to items of one or more object subtypes.', 'gutenberg' ), - 'type' => 'array', - 'items' => array( - 'enum' => array_merge( $subtypes, array( self::TYPE_ANY ) ), - 'type' => 'string', - ), - 'sanitize_callback' => array( $this, 'sanitize_subtypes' ), - ); - - return $query_params; - } - - /** - * Sanitizes the list of subtypes, to ensure only subtypes of the passed type are included. - * - * @since 3.3.0 - * - * @param string|array $subtypes One or more subtypes. - * @param WP_REST_Request $request Full details about the request. - * @param string $parameter Parameter name. - * @return array|WP_Error List of valid subtypes, or WP_Error object on failure. - */ - public function sanitize_subtypes( $subtypes, $request, $parameter ) { - $subtypes = wp_parse_slug_list( $subtypes ); - - $subtypes = rest_parse_request_arg( $subtypes, $request, $parameter ); - if ( is_wp_error( $subtypes ) ) { - return $subtypes; - } - - // 'any' overrides any other subtype. - if ( in_array( self::TYPE_ANY, $subtypes, true ) ) { - return array( self::TYPE_ANY ); - } - - $handler = $this->get_search_handler( $request ); - if ( is_wp_error( $handler ) ) { - return $handler; - } - - return array_intersect( $subtypes, $handler->get_subtypes() ); - } - - /** - * Gets the search handler to handle the current request. - * - * @since 3.3.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return WP_REST_Search_Handler|WP_Error Search handler for the request type, or WP_Error object on failure. - */ - protected function get_search_handler( $request ) { - $type = $request->get_param( self::PROP_TYPE ); - - if ( ! $type || ! isset( $this->search_handlers[ $type ] ) ) { - return new WP_Error( 'rest_search_invalid_type', __( 'Invalid type parameter.', 'gutenberg' ), array( 'status' => 400 ) ); - } - - return $this->search_handlers[ $type ]; - } -} diff --git a/lib/class-wp-rest-search-handler.php b/lib/class-wp-rest-search-handler.php deleted file mode 100644 index 6c5351d45b0029..00000000000000 --- a/lib/class-wp-rest-search-handler.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * REST API: WP_REST_Search_Handler class - * - * @package gutenberg - * @since 3.3.0 - */ - -/** - * Core base class representing a search handler for an object type in the REST API. - * - * @since 3.3.0 - */ -abstract class WP_REST_Search_Handler { - - /** - * Field containing the IDs in the search result. - */ - const RESULT_IDS = 'ids'; - - /** - * Field containing the total count in the search result. - */ - const RESULT_TOTAL = 'total'; - - /** - * Object type managed by this search handler. - * - * @since 3.3.0 - * @var string - */ - protected $type = ''; - - /** - * Object subtypes managed by this search handler. - * - * @since 3.3.0 - * @var array - */ - protected $subtypes = array(); - - /** - * Gets the object type managed by this search handler. - * - * @since 3.3.0 - * - * @return string Object type identifier. - */ - public function get_type() { - return $this->type; - } - - /** - * Gets the object subtypes managed by this search handler. - * - * @since 3.3.0 - * - * @return array Array of object subtype identifiers. - */ - public function get_subtypes() { - return $this->subtypes; - } - - /** - * Searches the object type content for a given search request. - * - * @since 3.3.0 - * - * @param WP_REST_Request $request Full REST request. - * @return array Associative array containing an `WP_REST_Search_Handler::RESULT_IDS` containing - * an array of found IDs and `WP_REST_Search_Handler::RESULT_TOTAL` containing the - * total count for the matching search results. - */ - abstract public function search_items( WP_REST_Request $request ); - - /** - * Prepares the search result for a given ID. - * - * @since 3.3.0 - * - * @param int $id Item ID. - * @param array $fields Fields to include for the item. - * @return array Associative array containing all fields for the item. - */ - abstract public function prepare_item( $id, array $fields ); - - /** - * Prepares links for the search result of a given ID. - * - * @since 3.3.0 - * - * @param int $id Item ID. - * @return array Links for the given item. - */ - abstract public function prepare_item_links( $id ); -} diff --git a/lib/class-wp-rest-themes-controller.php b/lib/class-wp-rest-themes-controller.php deleted file mode 100644 index b2ddf4e0e39101..00000000000000 --- a/lib/class-wp-rest-themes-controller.php +++ /dev/null @@ -1,237 +0,0 @@ -<?php -/** - * REST API: WP_REST_Themes_Controller class - * - * @package WordPress - * @subpackage REST_API - * @since 5.0.0 - */ - -/** - * Core class used to manage themes via the REST API. - * - * @since 5.0.0 - * - * @see WP_REST_Controller - */ -class WP_REST_Themes_Controller extends WP_REST_Controller { - - /** - * Constructor. - * - * @since 5.0.0 - */ - public function __construct() { - $this->namespace = 'wp/v2'; - $this->rest_base = 'themes'; - } - - /** - * Registers the routes for the objects of the controller. - * - * @since 5.0.0 - * - * @see register_rest_route() - */ - public function register_routes() { - register_rest_route( - $this->namespace, - '/' . $this->rest_base, - array( - array( - 'methods' => WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_items' ), - 'permission_callback' => array( $this, 'get_items_permissions_check' ), - 'args' => $this->get_collection_params(), - ), - 'schema' => array( $this, 'get_item_schema' ), - ) - ); - } - - /** - * Checks if a given request has access to read the theme. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return true|WP_Error True if the request has read access for the item, otherwise WP_Error object. - */ - public function get_items_permissions_check( $request ) { - if ( ! is_user_logged_in() || ! current_user_can( 'edit_posts' ) ) { - return new WP_Error( 'rest_user_cannot_view', __( 'Sorry, you are not allowed to view themes.', 'gutenberg' ), array( 'status' => rest_authorization_required_code() ) ); - } - - return true; - } - - /** - * Retrieves a collection of themes. - * - * @since 5.0.0 - * - * @param WP_REST_Request $request Full details about the request. - * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. - */ - public function get_items( $request ) { - // Retrieve the list of registered collection query parameters. - $registered = $this->get_collection_params(); - $themes = array(); - - if ( isset( $registered['status'], $request['status'] ) && in_array( 'active', $request['status'], true ) ) { - $active_theme = wp_get_theme(); - $active_theme = $this->prepare_item_for_response( $active_theme, $request ); - $themes[] = $this->prepare_response_for_collection( $active_theme ); - } - - $response = rest_ensure_response( $themes ); - - $response->header( 'X-WP-Total', count( $themes ) ); - $response->header( 'X-WP-TotalPages', count( $themes ) ); - - return $response; - } - - /** - * Prepares a single theme output for response. - * - * @since 5.0.0 - * - * @param WP_Theme $theme Theme object. - * @param WP_REST_Request $request Request object. - * @return WP_REST_Response Response object. - */ - public function prepare_item_for_response( $theme, $request ) { - $data = array(); - $fields = $this->get_fields_for_response( $request ); - - if ( in_array( 'theme_supports', $fields, true ) ) { - $formats = get_theme_support( 'post-formats' ); - $formats = is_array( $formats ) ? array_values( $formats[0] ) : array(); - $formats = array_merge( array( 'standard' ), $formats ); - $data['theme_supports']['formats'] = $formats; - - $data['theme_supports']['post-thumbnails'] = false; - $data['theme_supports']['responsive-embeds'] = (bool) get_theme_support( 'responsive-embeds' ); - $post_thumbnails = get_theme_support( 'post-thumbnails' ); - - if ( $post_thumbnails ) { - // $post_thumbnails can contain a nested array of post types. - // e.g. array( array( 'post', 'page' ) ). - $data['theme_supports']['post-thumbnails'] = is_array( $post_thumbnails ) ? $post_thumbnails[0] : true; - } - } - - $data = $this->add_additional_fields_to_object( $data, $request ); - - // Wrap the data in a response object. - $response = rest_ensure_response( $data ); - - /** - * Filters theme data returned from the REST API. - * - * @since 5.0.0 - * - * @param WP_REST_Response $response The response object. - * @param WP_Theme $theme Theme object used to create response. - * @param WP_REST_Request $request Request object. - */ - return apply_filters( 'rest_prepare_theme', $response, $theme, $request ); - } - - /** - * Retrieves the theme's schema, conforming to JSON Schema. - * - * @since 5.0.0 - * - * @return array Item schema data. - */ - public function get_item_schema() { - $schema = array( - '$schema' => 'http://json-schema.org/draft-04/schema#', - 'title' => 'theme', - 'type' => 'object', - 'properties' => array( - 'theme_supports' => array( - 'description' => __( 'Features supported by this theme.', 'gutenberg' ), - 'type' => 'array', - 'readonly' => true, - 'properties' => array( - 'formats' => array( - 'description' => __( 'Post formats supported.', 'gutenberg' ), - 'type' => 'array', - 'readonly' => true, - ), - 'post-thumbnails' => array( - 'description' => __( 'Whether the theme supports post thumbnails.', 'gutenberg' ), - 'type' => array( 'array', 'bool' ), - 'readonly' => true, - ), - 'responsive-embeds' => array( - 'description' => __( 'Whether the theme supports responsive embedded content.', 'gutenberg' ), - 'type' => 'bool', - 'readonly' => true, - ), - ), - ), - ), - ); - - return $this->add_additional_fields_schema( $schema ); - } - - /** - * Retrieves the search params for the themes collection. - * - * @since 5.0.0 - * - * @return array Collection parameters. - */ - public function get_collection_params() { - $query_params = parent::get_collection_params(); - - $query_params['status'] = array( - 'description' => __( 'Limit result set to themes assigned one or more statuses.', 'gutenberg' ), - 'type' => 'array', - 'items' => array( - 'enum' => array( 'active' ), - 'type' => 'string', - ), - 'required' => true, - 'sanitize_callback' => array( $this, 'sanitize_theme_status' ), - ); - - /** - * Filter collection parameters for the themes controller. - * - * @since 5.0.0 - * - * @param array $query_params JSON Schema-formatted collection parameters. - */ - return apply_filters( 'rest_themes_collection_params', $query_params ); - } - - /** - * Sanitizes and validates the list of theme status. - * - * @since 5.0.0 - * - * @param string|array $statuses One or more theme statuses. - * @param WP_REST_Request $request Full details about the request. - * @param string $parameter Additional parameter to pass to validation. - * @return array|WP_Error A list of valid statuses, otherwise WP_Error object. - */ - public function sanitize_theme_status( $statuses, $request, $parameter ) { - $statuses = wp_parse_slug_list( $statuses ); - - foreach ( $statuses as $status ) { - $result = rest_validate_request_arg( $status, $request, $parameter ); - - if ( is_wp_error( $result ) ) { - return $result; - } - } - - return $statuses; - } -} diff --git a/lib/load.php b/lib/load.php index 034b3c9e83cebb..8306f6f030f83b 100644 --- a/lib/load.php +++ b/lib/load.php @@ -12,28 +12,6 @@ // These files only need to be loaded if within a rest server instance // which this class will exist if that is the case. if ( class_exists( 'WP_REST_Controller' ) ) { - if ( ! class_exists( 'WP_REST_Blocks_Controller' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-blocks-controller.php'; - } - if ( ! class_exists( 'WP_REST_Autosaves_Controller' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-autosaves-controller.php'; - } - if ( ! class_exists( 'WP_REST_Themes_Controller' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-themes-controller.php'; - } - if ( ! class_exists( 'WP_REST_Block_Renderer_Controller' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-block-renderer-controller.php'; - } - if ( ! class_exists( 'WP_REST_Search_Controller' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-search-controller.php'; - } - if ( ! class_exists( 'WP_REST_Search_Handler' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-search-handler.php'; - } - if ( ! class_exists( 'WP_REST_Post_Search_Handler' ) ) { - require dirname( __FILE__ ) . '/class-wp-rest-post-search-handler.php'; - } - require dirname( __FILE__ ) . '/rest-api.php'; } diff --git a/lib/rest-api.php b/lib/rest-api.php index 2baec1befdd19d..616493a371219f 100644 --- a/lib/rest-api.php +++ b/lib/rest-api.php @@ -14,42 +14,11 @@ * Registers the REST API routes needed by the Gutenberg editor. * * @since 2.8.0 + * @deprecated 5.0.0 */ function gutenberg_register_rest_routes() { - $controller = new WP_REST_Block_Renderer_Controller(); - $controller->register_routes(); - - /** - * Filters the search handlers to use in the REST search controller. - * - * @since 3.3.0 - * - * @param array $search_handlers List of search handlers to use in the controller. Each search - * handler instance must extend the `WP_REST_Search_Handler` class. - * Default is only a handler for posts. - */ - $search_handlers = apply_filters( 'wp_rest_search_handlers', array( new WP_REST_Post_Search_Handler() ) ); - - $controller = new WP_REST_Search_Controller( $search_handlers ); - $controller->register_routes(); - - foreach ( get_post_types( array( 'show_in_rest' => true ), 'objects' ) as $post_type ) { - $class = ! empty( $post_type->rest_controller_class ) ? $post_type->rest_controller_class : 'WP_REST_Posts_Controller'; - - // Check if the class exists and is a subclass of WP_REST_Controller. - if ( ! is_subclass_of( $class, 'WP_REST_Controller' ) ) { - continue; - } - - // Initialize the Autosaves controller. - $autosaves_controller = new WP_REST_Autosaves_Controller( $post_type->name ); - $autosaves_controller->register_routes(); - } - - $themes_controller = new WP_REST_Themes_Controller(); - $themes_controller->register_routes(); + _deprecated_function( __FUNCTION__, '5.0.0' ); } -add_action( 'rest_api_init', 'gutenberg_register_rest_routes' ); /** * Make sure oEmbed REST Requests apply the WP Embed security mechanism for WordPress embeds. @@ -120,105 +89,38 @@ function gutenberg_filter_oembed_result( $response, $handler, $request ) { * Used so private taxonomies are not displayed in the UI. * * @see https://core.trac.wordpress.org/ticket/42707 + * @deprecated 5.0.0 */ function gutenberg_add_taxonomy_visibility_field() { - register_rest_field( - 'taxonomy', - 'visibility', - array( - 'get_callback' => 'gutenberg_get_taxonomy_visibility_data', - 'schema' => array( - 'description' => __( 'The visibility settings for the taxonomy.', 'gutenberg' ), - 'type' => 'object', - 'context' => array( 'edit' ), - 'readonly' => true, - 'properties' => array( - 'public' => array( - 'description' => __( 'Whether a taxonomy is intended for use publicly either via the admin interface or by front-end users.', 'gutenberg' ), - 'type' => 'boolean', - ), - 'publicly_queryable' => array( - 'description' => __( 'Whether the taxonomy is publicly queryable.', 'gutenberg' ), - 'type' => 'boolean', - ), - 'show_ui' => array( - 'description' => __( 'Whether to generate a default UI for managing this taxonomy.', 'gutenberg' ), - 'type' => 'boolean', - ), - 'show_admin_column' => array( - 'description' => __( 'Whether to allow automatic creation of taxonomy columns on associated post-types table.', 'gutenberg' ), - 'type' => 'boolean', - ), - 'show_in_nav_menus' => array( - 'description' => __( 'Whether to make the taxonomy available for selection in navigation menus.', 'gutenberg' ), - 'type' => 'boolean', - ), - 'show_in_quick_edit' => array( - 'description' => __( 'Whether to show the taxonomy in the quick/bulk edit panel.', 'gutenberg' ), - 'type' => 'boolean', - ), - ), - ), - ) - ); + _deprecated_function( __FUNCTION__, '5.0.0' ); } /** * Gets taxonomy visibility property data. * * @see https://core.trac.wordpress.org/ticket/42707 + * @deprecated 5.0.0 * * @param array $object Taxonomy data from REST API. * @return array Array of taxonomy visibility data. */ function gutenberg_get_taxonomy_visibility_data( $object ) { - // Just return existing data for up-to-date Core. - if ( isset( $object['visibility'] ) ) { - return $object['visibility']; - } + _deprecated_function( __FUNCTION__, '5.0.0' ); - $taxonomy = get_taxonomy( $object['slug'] ); - - return array( - 'public' => $taxonomy->public, - 'publicly_queryable' => $taxonomy->publicly_queryable, - 'show_ui' => $taxonomy->show_ui, - 'show_admin_column' => $taxonomy->show_admin_column, - 'show_in_nav_menus' => $taxonomy->show_in_nav_menus, - 'show_in_quick_edit' => $taxonomy->show_ui, - ); + return isset( $object['visibility'] ) ? $object['visibility'] : array(); } -add_action( 'rest_api_init', 'gutenberg_add_taxonomy_visibility_field' ); - /** * Add a permalink template to posts in the post REST API response. * * @see https://core.trac.wordpress.org/ticket/45017 + * @deprecated 5.0.0 * * @param WP_REST_Response $response WP REST API response of a post. - * @param WP_Post $post The post being returned. - * @param WP_REST_Request $request WP REST API request. * @return WP_REST_Response Response containing the permalink_template. */ -function gutenberg_add_permalink_template_to_posts( $response, $post, $request ) { - if ( 'edit' !== $request['context'] ) { - return $response; - } - - $post_type_obj = get_post_type_object( $post->post_type ); - if ( ! is_post_type_viewable( $post_type_obj ) || ! $post_type_obj->public ) { - return $response; - } - - if ( ! function_exists( 'get_sample_permalink' ) ) { - require_once ABSPATH . '/wp-admin/includes/post.php'; - } - - $sample_permalink = get_sample_permalink( $post->ID, $post->post_title, '' ); - - $response->data['permalink_template'] = $sample_permalink[0]; - $response->data['generated_slug'] = $sample_permalink[1]; +function gutenberg_add_permalink_template_to_posts( $response ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); return $response; } @@ -226,25 +128,14 @@ function gutenberg_add_permalink_template_to_posts( $response, $post, $request ) /** * Add the block format version to post content in the post REST API response. * - * @todo This will need to be registered to the schema too. - * * @see https://core.trac.wordpress.org/ticket/43887 + * @deprecated 5.0.0 * * @param WP_REST_Response $response WP REST API response of a post. - * @param WP_Post $post The post being returned. - * @param WP_REST_Request $request WP REST API request. * @return WP_REST_Response Response containing the block_format. */ -function gutenberg_add_block_format_to_post_content( $response, $post, $request ) { - if ( 'edit' !== $request['context'] ) { - return $response; - } - - $response_data = $response->get_data(); - if ( isset( $response_data['content'] ) && is_array( $response_data['content'] ) && isset( $response_data['content']['raw'] ) ) { - $response_data['content']['block_format'] = gutenberg_content_block_version( $response_data['content']['raw'] ); - $response->set_data( $response_data ); - } +function gutenberg_add_block_format_to_post_content( $response ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); return $response; } @@ -253,100 +144,52 @@ function gutenberg_add_block_format_to_post_content( $response, $post, $request * Include target schema attributes to links, based on whether the user can. * * @see https://core.trac.wordpress.org/ticket/45014 + * @deprecated 5.0.0 * * @param WP_REST_Response $response WP REST API response of a post. - * @param WP_Post $post The post being returned. - * @param WP_REST_Request $request WP REST API request. * @return WP_REST_Response Response containing the new links. */ -function gutenberg_add_target_schema_to_links( $response, $post, $request ) { - $new_links = array(); - $orig_links = $response->get_links(); - $post_type = get_post_type_object( $post->post_type ); - $orig_href = ! empty( $orig_links['self'][0]['href'] ) ? $orig_links['self'][0]['href'] : null; - if ( 'edit' === $request['context'] && current_user_can( 'unfiltered_html' ) ) { - $new_links['https://api.w.org/action-unfiltered-html'] = array( - array( - 'title' => __( 'The current user can post HTML markup and JavaScript.', 'gutenberg' ), - 'href' => $orig_href, - 'targetSchema' => array( - 'type' => 'object', - 'properties' => array( - 'unfiltered_html' => array( - 'type' => 'boolean', - ), - ), - ), - ), - ); - } +function gutenberg_add_target_schema_to_links( $response ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); - $response->add_links( $new_links ); return $response; } /** * Whenever a post type is registered, ensure we're hooked into it's WP REST API response. * + * @deprecated 5.0.0 + * * @param string $post_type The newly registered post type. * @return string That same post type. */ function gutenberg_register_post_prepare_functions( $post_type ) { - add_filter( "rest_prepare_{$post_type}", 'gutenberg_add_permalink_template_to_posts', 10, 3 ); - add_filter( "rest_prepare_{$post_type}", 'gutenberg_add_block_format_to_post_content', 10, 3 ); - add_filter( "rest_prepare_{$post_type}", 'gutenberg_add_target_schema_to_links', 10, 3 ); + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $post_type; } -add_filter( 'registered_post_type', 'gutenberg_register_post_prepare_functions' ); - /** * Silence PHP Warnings and Errors in JSON requests * - * @todo This is a temporary measure until errors are properly silenced in REST API responses in core - * * @see https://core.trac.wordpress.org/ticket/44534 + * @deprecated 5.0.0 */ function gutenberg_silence_rest_errors() { - - if ( ( isset( $_SERVER['CONTENT_TYPE'] ) && 'application/json' === $_SERVER['CONTENT_TYPE'] ) || - ( isset( $_SERVER['HTTP_ACCEPT'] ) && strpos( $_SERVER['HTTP_ACCEPT'], 'application/json' ) !== false ) ) { - // @codingStandardsIgnoreStart - @ini_set( 'display_errors', 0 ); - // @codingStandardsIgnoreEnd - } - + _deprecated_function( __FUNCTION__, '5.0.0' ); } /** * Include additional labels for registered post types * * @see https://core.trac.wordpress.org/ticket/45101 + * @deprecated 5.0.0 * - * @param array $args Arguments supplied to register_post_type(). - * @param string $post_type Post type key. + * @param array $args Arguments supplied to register_post_type(). * @return array Arguments supplied to register_post_type() */ -function gutenberg_filter_post_type_labels( $args, $post_type ) { - $registered_labels = ( empty( $args['labels'] ) ) ? array() : $args['labels']; - if ( is_post_type_hierarchical( $post_type ) ) { - $labels = array( - 'item_published' => __( 'Page published.', 'gutenberg' ), - 'item_published_privately' => __( 'Page published privately.', 'gutenberg' ), - 'item_reverted_to_draft' => __( 'Page reverted to draft.', 'gutenberg' ), - 'item_scheduled' => __( 'Page scheduled.', 'gutenberg' ), - 'item_updated' => __( 'Page updated.', 'gutenberg' ), - ); - } else { - $labels = array( - 'item_published' => __( 'Post published.', 'gutenberg' ), - 'item_published_privately' => __( 'Post published privately.', 'gutenberg' ), - 'item_reverted_to_draft' => __( 'Post reverted to draft.', 'gutenberg' ), - 'item_scheduled' => __( 'Post scheduled.', 'gutenberg' ), - 'item_updated' => __( 'Post updated.', 'gutenberg' ), - ); - } - $args['labels'] = array_merge( $labels, $registered_labels ); +function gutenberg_filter_post_type_labels( $args ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $args; } -add_filter( 'register_post_type_args', 'gutenberg_filter_post_type_labels', 10, 2 ); diff --git a/phpunit/bootstrap.php b/phpunit/bootstrap.php index 80d806ee4452ad..6043dd1bbd0377 100644 --- a/phpunit/bootstrap.php +++ b/phpunit/bootstrap.php @@ -36,7 +36,6 @@ function _manually_load_plugin() { // Require dummy block type class for testing. require_once dirname( __FILE__ ) . '/class-wp-dummy-block-type.php'; - require_once dirname( __FILE__ ) . '/class-wp-rest-dummy-search-handler.php'; } tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); diff --git a/phpunit/class-gutenberg-rest-api-test.php b/phpunit/class-gutenberg-rest-api-test.php deleted file mode 100644 index 293dc7fed3526c..00000000000000 --- a/phpunit/class-gutenberg-rest-api-test.php +++ /dev/null @@ -1,427 +0,0 @@ -<?php -/** - * WP_Block_Type_Registry Tests - * - * @package Gutenberg - */ - -/** - * Tests for WP_Block_Type_Registry - */ -class Gutenberg_REST_API_Test extends WP_Test_REST_TestCase { - function setUp() { - parent::setUp(); - - $this->administrator = $this->factory->user->create( - array( - 'role' => 'administrator', - ) - ); - $this->author = $this->factory->user->create( - array( - 'role' => 'author', - ) - ); - $this->editor = $this->factory->user->create( - array( - 'role' => 'editor', - ) - ); - $this->contributor = $this->factory->user->create( - array( - 'role' => 'contributor', - ) - ); - $this->subscriber = $this->factory->user->create( - array( - 'role' => 'subscriber', - 'display_name' => 'subscriber', - 'user_email' => 'subscriber@example.com', - ) - ); - } - - function tearDown() { - parent::tearDown(); - } - - /** - * Should return an extra visibility field on response when in edit context. - */ - function test_visibility_field() { - $request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/category' ); - $request->set_param( 'context', 'edit' ); - - $permitted_users = array( - $this->administrator, - $this->editor, - $this->author, - ); - - foreach ( $permitted_users as $user ) { - wp_set_current_user( $user ); - - $response = rest_do_request( $request ); - $result = $response->get_data(); - - $this->assertTrue( isset( $result['visibility'] ) ); - $this->assertInternalType( 'array', $result['visibility'] ); - $this->assertArrayHasKey( 'public', $result['visibility'] ); - $this->assertArrayHasKey( 'publicly_queryable', $result['visibility'] ); - $this->assertArrayHasKey( 'show_ui', $result['visibility'] ); - $this->assertArrayHasKey( 'show_admin_column', $result['visibility'] ); - $this->assertArrayHasKey( 'show_in_nav_menus', $result['visibility'] ); - $this->assertArrayHasKey( 'show_in_quick_edit', $result['visibility'] ); - } - } - - /** - * Should not return an extra visibility field without context set. - */ - function test_visibility_field_without_context() { - $request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies/category' ); - $response = rest_do_request( $request ); - - $result = $response->get_data(); - - $this->assertFalse( isset( $result['visibility'] ) ); - } - - /** - * Should return an extra viewable field on response when in edit context. - */ - function test_viewable_field() { - wp_set_current_user( $this->administrator ); - $request = new WP_REST_Request( 'GET', '/wp/v2/types/post' ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $result = $response->get_data(); - $this->assertTrue( isset( $result['viewable'] ) ); - $this->assertTrue( $result['viewable'] ); - } - - /** - * Should not return viewable field without context set. - */ - function test_viewable_field_without_context() { - $request = new WP_REST_Request( 'GET', '/wp/v2/types/post' ); - $response = rest_do_request( $request ); - $result = $response->get_data(); - $this->assertFalse( isset( $result['viewable'] ) ); - } - - /** - * Only returns wp:action-unfiltered_html when current user can use unfiltered HTML. - * See https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table - */ - function test_link_unfiltered_html() { - $post_id = $this->factory->post->create(); - $check_key = 'https://api.w.org/action-unfiltered-html'; - // admins can in a single site, but can't in a multisite. - wp_set_current_user( $this->administrator ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - if ( is_multisite() ) { - $this->assertFalse( isset( $links[ $check_key ] ) ); - } else { - $this->assertTrue( isset( $links[ $check_key ] ) ); - } - // authors can't. - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - // editors can in a single site, but can't in a multisite. - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - if ( is_multisite() ) { - $this->assertFalse( isset( $links[ $check_key ] ) ); - } else { - $this->assertTrue( isset( $links[ $check_key ] ) ); - } - // contributors can't. - wp_set_current_user( $this->contributor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - } - - /** - * Only returns wp:action-assign-author when current user can assign author. - */ - function test_link_assign_author_only_appears_for_editor() { - $post_id = $this->factory->post->create(); - $check_key = 'https://api.w.org/action-assign-author'; - // authors cannot assign author. - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - // editors can assign author. - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertTrue( isset( $links[ $check_key ] ) ); - // editors can assign author but not included for context != edit. - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'view' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - } - - /** - * Only returns wp:action-publish when current user can publish. - */ - function test_link_publish_only_appears_for_author() { - $post_id = $this->factory->post->create( - array( - 'post_author' => $this->author, - ) - ); - $check_key = 'https://api.w.org/action-publish'; - // contributors cannot sticky. - wp_set_current_user( $this->contributor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - // authors can publish. - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertTrue( isset( $links[ $check_key ] ) ); - // authors can publish but not included for context != edit. - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'view' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - } - - /** - * Only returns wp:action-sticky when current user can sticky. - */ - function test_link_sticky_only_appears_for_editor() { - $post_id = $this->factory->post->create(); - $check_key = 'https://api.w.org/action-sticky'; - // authors cannot sticky. - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - // editors can sticky. - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertTrue( isset( $links[ $check_key ] ) ); - // editors can sticky but not included for context != edit. - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $post_id ); - $request->set_param( 'context', 'view' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertFalse( isset( $links[ $check_key ] ) ); - } - - /** - * Only returns term-related actions when current user can do so. - */ - function test_link_term_management_per_user() { - $contributor_post = $this->factory->post->create( - array( - 'post_author' => $this->contributor, - 'post_status' => 'draft', - ) - ); - $author_post = $this->factory->post->create( - array( - 'post_author' => $this->author, - ) - ); - $create_tags = 'https://api.w.org/action-create-tags'; - $assign_tags = 'https://api.w.org/action-assign-tags'; - $create_categories = 'https://api.w.org/action-create-categories'; - $assign_categories = 'https://api.w.org/action-assign-categories'; - // Contributors can create and assign tags, but only assign categories. - wp_set_current_user( $this->contributor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $contributor_post ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertTrue( isset( $links[ $create_tags ] ) ); - $this->assertTrue( isset( $links[ $assign_tags ] ) ); - $this->assertFalse( isset( $links[ $create_categories ] ) ); - $this->assertTrue( isset( $links[ $assign_categories ] ) ); - // Authors can create and assign tags, but only assign categories. - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $author_post ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertTrue( isset( $links[ $create_tags ] ) ); - $this->assertTrue( isset( $links[ $assign_tags ] ) ); - $this->assertFalse( isset( $links[ $create_categories ] ) ); - $this->assertTrue( isset( $links[ $assign_categories ] ) ); - // Editors can do everything. - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . $author_post ); - $request->set_param( 'context', 'edit' ); - $response = rest_do_request( $request ); - $links = $response->get_links(); - $this->assertTrue( isset( $links[ $create_tags ] ) ); - $this->assertTrue( isset( $links[ $assign_tags ] ) ); - $this->assertTrue( isset( $links[ $create_categories ] ) ); - $this->assertTrue( isset( $links[ $assign_categories ] ) ); - } - - public function test_get_taxonomies_context_edit() { - wp_set_current_user( $this->contributor ); - $request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' ); - $request->set_param( 'context', 'edit' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 200, $response->get_status() ); - $data = $response->get_data(); - $taxonomies = array(); - foreach ( get_taxonomies( '', 'objects' ) as $taxonomy ) { - if ( ! empty( $taxonomy->show_in_rest ) ) { - $taxonomies[] = $taxonomy; - } - } - $this->assertEquals( count( $taxonomies ), count( $data ) ); - $this->assertEquals( 'Categories', $data['category']['name'] ); - $this->assertEquals( 'category', $data['category']['slug'] ); - $this->assertEquals( true, $data['category']['hierarchical'] ); - $this->assertEquals( 'Tags', $data['post_tag']['name'] ); - $this->assertEquals( 'post_tag', $data['post_tag']['slug'] ); - $this->assertEquals( false, $data['post_tag']['hierarchical'] ); - $this->assertEquals( 'tags', $data['post_tag']['rest_base'] ); - } - - public function test_get_taxonomies_invalid_permission_for_context() { - wp_set_current_user( $this->subscriber ); - $request = new WP_REST_Request( 'GET', '/wp/v2/taxonomies' ); - $request->set_param( 'context', 'edit' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_cannot_view', $response, 403 ); - } - - public function test_create_category_incorrect_permissions_author() { - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'POST', '/wp/v2/categories' ); - $request->set_param( 'name', 'Incorrect permissions' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_cannot_create', $response, 403 ); - } - - public function test_create_category_editor() { - wp_set_current_user( $this->editor ); - $request = new WP_REST_Request( 'POST', '/wp/v2/categories' ); - $request->set_param( 'name', 'My Awesome Term' ); - $request->set_param( 'description', 'This term is so awesome.' ); - $request->set_param( 'slug', 'so-awesome' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 201, $response->get_status() ); - $headers = $response->get_headers(); - $data = $response->get_data(); - $this->assertContains( '/wp/v2/categories/' . $data['id'], $headers['Location'] ); - $this->assertEquals( 'My Awesome Term', $data['name'] ); - $this->assertEquals( 'This term is so awesome.', $data['description'] ); - $this->assertEquals( 'so-awesome', $data['slug'] ); - } - - public function test_create_tag_incorrect_permissions_subscriber() { - wp_set_current_user( $this->subscriber ); - $request = new WP_REST_Request( 'POST', '/wp/v2/tags' ); - $request->set_param( 'name', 'Incorrect permissions' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_cannot_create', $response, 403 ); - } - - public function test_create_tag_contributor() { - wp_set_current_user( $this->contributor ); - $request = new WP_REST_Request( 'POST', '/wp/v2/tags' ); - $request->set_param( 'name', 'My Awesome Term' ); - $request->set_param( 'description', 'This term is so awesome.' ); - $request->set_param( 'slug', 'so-awesome' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 201, $response->get_status() ); - $headers = $response->get_headers(); - $data = $response->get_data(); - $this->assertContains( '/wp/v2/tags/' . $data['id'], $headers['Location'] ); - $this->assertEquals( 'My Awesome Term', $data['name'] ); - $this->assertEquals( 'This term is so awesome.', $data['description'] ); - $this->assertEquals( 'so-awesome', $data['slug'] ); - } - - public function test_get_items_unbounded_per_page() { - wp_set_current_user( $this->author ); - $request = new WP_REST_Request( 'GET', '/wp/v2/users' ); - $request->set_param( 'per_page', '-1' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 400, $response->get_status() ); - } - - public function test_get_categories_unbounded_per_page() { - wp_set_current_user( $this->author ); - $this->factory->category->create(); - $request = new WP_REST_Request( 'GET', '/wp/v2/categories' ); - $request->set_param( 'per_page', '-1' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 400, $response->get_status() ); - } - - public function test_get_pages_unbounded_per_page() { - wp_set_current_user( $this->author ); - $this->factory->post->create( array( 'post_type' => 'page' ) ); - $request = new WP_REST_Request( 'GET', '/wp/v2/pages' ); - $request->set_param( 'per_page', '-1' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 400, $response->get_status() ); - } - - public function test_get_post_links_predecessor_version() { - $post_id = $this->factory->post->create(); - wp_update_post( - array( - 'post_content' => 'This content is marvelous.', - 'ID' => $post_id, - ) - ); - $revisions = wp_get_post_revisions( $post_id ); - $revision_1 = array_pop( $revisions ); - - $request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', $post_id ) ); - $response = rest_get_server()->dispatch( $request ); - - $links = $response->get_links(); - - $this->assertEquals( rest_url( '/wp/v2/posts/' . $post_id . '/revisions' ), $links['version-history'][0]['href'] ); - $this->assertEquals( 1, $links['version-history'][0]['attributes']['count'] ); - - $this->assertEquals( rest_url( '/wp/v2/posts/' . $post_id . '/revisions/' . $revision_1->ID ), $links['predecessor-version'][0]['href'] ); - $this->assertEquals( $revision_1->ID, $links['predecessor-version'][0]['attributes']['id'] ); - } -} diff --git a/phpunit/class-rest-autosaves-controller-test.php b/phpunit/class-rest-autosaves-controller-test.php deleted file mode 100644 index 10d2b23ef97067..00000000000000 --- a/phpunit/class-rest-autosaves-controller-test.php +++ /dev/null @@ -1,605 +0,0 @@ -<?php -/** - * Unit tests covering WP_REST_Autosaves_Controller functionality. - * - * @package WordPress - * @subpackage REST API - */ - -/** - * @group restapi-autosave - * @group restapi - */ -class WP_Test_REST_Autosaves_Controller extends WP_Test_REST_Post_Type_Controller_Testcase { - protected static $post_id; - protected static $page_id; - protected static $draft_page_id; - - protected static $autosave_post_id; - protected static $autosave_page_id; - - protected static $editor_id; - protected static $contributor_id; - - protected static $parent_page_id; - protected static $child_page_id; - protected static $child_draft_page_id; - - protected function set_post_data( $args = array() ) { - $defaults = array( - 'title' => 'Post Title', - 'content' => 'Post content', - 'excerpt' => 'Post excerpt', - 'name' => 'test', - 'author' => get_current_user_id(), - ); - - return wp_parse_args( $args, $defaults ); - } - - protected function check_create_autosave_response( $response ) { - $this->assertNotInstanceOf( 'WP_Error', $response ); - $response = rest_ensure_response( $response ); - $data = $response->get_data(); - - $this->assertArrayHasKey( 'content', $data ); - $this->assertArrayHasKey( 'excerpt', $data ); - $this->assertArrayHasKey( 'title', $data ); - } - - public static function wpSetUpBeforeClass( $factory ) { - self::$post_id = $factory->post->create(); - self::$page_id = $factory->post->create( array( 'post_type' => 'page' ) ); - - self::$editor_id = $factory->user->create( - array( - 'role' => 'editor', - ) - ); - self::$contributor_id = $factory->user->create( - array( - 'role' => 'contributor', - ) - ); - - wp_set_current_user( self::$editor_id ); - - // Create an autosave. - self::$autosave_post_id = wp_create_post_autosave( - array( - 'post_content' => 'This content is better.', - 'post_ID' => self::$post_id, - 'post_type' => 'post', - ) - ); - - self::$autosave_page_id = wp_create_post_autosave( - array( - 'post_content' => 'This content is better.', - 'post_ID' => self::$page_id, - 'post_type' => 'post', - ) - ); - - self::$draft_page_id = $factory->post->create( - array( - 'post_type' => 'page', - 'post_status' => 'draft', - ) - ); - self::$parent_page_id = $factory->post->create( - array( - 'post_type' => 'page', - ) - ); - self::$child_page_id = $factory->post->create( - array( - 'post_type' => 'page', - 'post_parent' => self::$parent_page_id, - ) - ); - self::$child_draft_page_id = $factory->post->create( - array( - 'post_type' => 'page', - 'post_parent' => self::$parent_page_id, - // The "update post" behavior of the autosave endpoint only occurs - // when saving a draft/auto-draft authored by the current user. - 'post_status' => 'draft', - 'post_author' => self::$editor_id, - ) - ); - } - - public static function wpTearDownAfterClass() { - // Also deletes revisions. - wp_delete_post( self::$post_id, true ); - wp_delete_post( self::$page_id, true ); - - self::delete_user( self::$editor_id ); - self::delete_user( self::$contributor_id ); - } - - public function setUp() { - parent::setUp(); - wp_set_current_user( self::$editor_id ); - - $this->post_autosave = wp_get_post_autosave( self::$post_id ); - } - - public function test_register_routes() { - $routes = rest_get_server()->get_routes(); - $this->assertArrayHasKey( '/wp/v2/posts/(?P<id>[\d]+)/autosaves', $routes ); - $this->assertArrayHasKey( '/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)', $routes ); - $this->assertArrayHasKey( '/wp/v2/pages/(?P<id>[\d]+)/autosaves', $routes ); - $this->assertArrayHasKey( '/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+)', $routes ); - } - - public function test_context_param() { - - // Collection. - $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - $this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] ); - $this->assertEqualSets( array( 'view', 'edit', 'embed' ), $data['endpoints'][0]['args']['context']['enum'] ); - - // Single. - $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - $this->assertEquals( 'view', $data['endpoints'][0]['args']['context']['default'] ); - $this->assertEqualSets( array( 'view', 'edit', 'embed' ), $data['endpoints'][0]['args']['context']['enum'] ); - } - - public function test_registered_query_params() { - $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $response = $this->server->dispatch( $request ); - $data = $response->get_data(); - $keys = array_keys( $data['endpoints'][0]['args'] ); - sort( $keys ); - $this->assertEquals( - array( - 'context', - 'parent', - ), - $keys - ); - } - - public function test_get_items() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - $this->assertEquals( 200, $response->get_status() ); - $this->assertCount( 1, $data ); - - $this->assertEquals( self::$autosave_post_id, $data[0]['id'] ); - - $this->check_get_autosave_response( $data[0], $this->post_autosave ); - } - - public function test_get_items_no_permission() { - wp_set_current_user( 0 ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_cannot_read', $response, 401 ); - wp_set_current_user( self::$contributor_id ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_cannot_read', $response, 403 ); - } - - public function test_get_items_missing_parent() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 ); - } - - public function test_get_items_invalid_parent_post_type() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$page_id . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 ); - } - - public function test_get_item() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 200, $response->get_status() ); - $data = $response->get_data(); - - $this->check_get_autosave_response( $response, $this->post_autosave ); - $fields = array( - 'author', - 'date', - 'date_gmt', - 'modified', - 'modified_gmt', - 'guid', - 'id', - 'parent', - 'slug', - 'title', - 'excerpt', - 'content', - ); - $this->assertEqualSets( $fields, array_keys( $data ) ); - $this->assertSame( self::$editor_id, $data['author'] ); - } - - public function test_get_item_embed_context() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - $request->set_param( 'context', 'embed' ); - $response = rest_get_server()->dispatch( $request ); - $fields = array( - 'author', - 'date', - 'id', - 'parent', - 'slug', - 'title', - 'excerpt', - ); - $data = $response->get_data(); - $this->assertEqualSets( $fields, array_keys( $data ) ); - } - - public function test_get_item_no_permission() { - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - wp_set_current_user( self::$contributor_id ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_cannot_read', $response, 403 ); - } - - public function test_get_item_missing_parent() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . REST_TESTS_IMPOSSIBLY_HIGH_NUMBER . '/autosaves/' . self::$autosave_post_id ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 ); - - } - - public function test_get_item_invalid_parent_post_type() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$page_id . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $this->assertErrorResponse( 'rest_post_invalid_parent', $response, 404 ); - } - - public function test_delete_item() { - // Doesn't exist. - } - - public function test_prepare_item() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - $response = rest_get_server()->dispatch( $request ); - $this->assertEquals( 200, $response->get_status() ); - $this->check_get_autosave_response( $response, $this->post_autosave ); - } - - public function test_get_item_schema() { - $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - $properties = $data['schema']['properties']; - $this->assertEquals( 13, count( $properties ) ); - $this->assertArrayHasKey( 'author', $properties ); - $this->assertArrayHasKey( 'content', $properties ); - $this->assertArrayHasKey( 'date', $properties ); - $this->assertArrayHasKey( 'date_gmt', $properties ); - $this->assertArrayHasKey( 'excerpt', $properties ); - $this->assertArrayHasKey( 'guid', $properties ); - $this->assertArrayHasKey( 'id', $properties ); - $this->assertArrayHasKey( 'modified', $properties ); - $this->assertArrayHasKey( 'modified_gmt', $properties ); - $this->assertArrayHasKey( 'parent', $properties ); - $this->assertArrayHasKey( 'slug', $properties ); - $this->assertArrayHasKey( 'title', $properties ); - $this->assertArrayHasKey( 'preview_link', $properties ); - } - - public function test_create_item() { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/x-www-form-urlencoded' ); - - $params = $this->set_post_data( - array( - 'id' => self::$post_id, - ) - ); - $request->set_body_params( $params ); - $response = rest_get_server()->dispatch( $request ); - - $this->check_create_autosave_response( $response ); - } - - public function test_update_item() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/x-www-form-urlencoded' ); - - $params = $this->set_post_data( - array( - 'id' => self::$post_id, - 'author' => self::$contributor_id, - ) - ); - - $request->set_body_params( $params ); - $response = rest_get_server()->dispatch( $request ); - - $this->check_create_autosave_response( $response ); - } - - public function test_update_item_nopriv() { - wp_set_current_user( self::$contributor_id ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/x-www-form-urlencoded' ); - - $params = $this->set_post_data( - array( - 'id' => self::$post_id, - 'author' => self::$editor_id, - ) - ); - - $request->set_body_params( $params ); - $response = rest_get_server()->dispatch( $request ); - - $this->assertErrorResponse( 'rest_cannot_edit', $response, 403 ); - } - - public function test_rest_autosave_published_post() { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/json' ); - - $current_post = get_post( self::$post_id ); - - $autosave_data = $this->set_post_data( - array( - 'id' => self::$post_id, - 'content' => 'Updated post \ content', - 'excerpt' => $current_post->post_excerpt, - 'title' => $current_post->post_title, - ) - ); - - $request->set_body( wp_json_encode( $autosave_data ) ); - $response = rest_get_server()->dispatch( $request ); - $new_data = $response->get_data(); - - $this->assertEquals( $current_post->ID, $new_data['parent'] ); - $this->assertEquals( $current_post->post_title, $new_data['title']['raw'] ); - $this->assertEquals( $current_post->post_excerpt, $new_data['excerpt']['raw'] ); - - // Updated post_content. - $this->assertNotEquals( $current_post->post_content, $new_data['content']['raw'] ); - - $autosave_post = wp_get_post_autosave( self::$post_id ); - $this->assertEquals( $autosave_data['title'], $autosave_post->post_title ); - $this->assertEquals( $autosave_data['content'], $autosave_post->post_content ); - $this->assertEquals( $autosave_data['excerpt'], $autosave_post->post_excerpt ); - } - - public function test_rest_autosave_draft_post_same_author() { - wp_set_current_user( self::$editor_id ); - - $post_data = array( - 'post_content' => 'Test post content', - 'post_title' => 'Test post title', - 'post_excerpt' => 'Test post excerpt', - ); - $post_id = wp_insert_post( $post_data ); - - $autosave_data = array( - 'id' => $post_id, - 'content' => 'Updated post \ content', - 'title' => 'Updated post title', - ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/json' ); - $request->set_body( wp_json_encode( $autosave_data ) ); - - $response = rest_get_server()->dispatch( $request ); - $new_data = $response->get_data(); - $post = get_post( $post_id ); - - $this->assertEquals( $post_id, $new_data['id'] ); - // The draft post should be updated. - $this->assertEquals( $autosave_data['content'], $new_data['content']['raw'] ); - $this->assertEquals( $autosave_data['title'], $new_data['title']['raw'] ); - $this->assertEquals( $autosave_data['content'], $post->post_content ); - $this->assertEquals( $autosave_data['title'], $post->post_title ); - - // Not updated. - $this->assertEquals( $post_data['post_excerpt'], $post->post_excerpt ); - - wp_delete_post( $post_id ); - } - - public function test_rest_autosave_draft_post_different_author() { - wp_set_current_user( self::$editor_id ); - - $post_data = array( - 'post_content' => 'Test post content', - 'post_title' => 'Test post title', - 'post_excerpt' => 'Test post excerpt', - 'post_author' => self::$editor_id + 1, - ); - $post_id = wp_insert_post( $post_data ); - - $autosave_data = array( - 'id' => $post_id, - 'content' => 'Updated post content', - 'excerpt' => $post_data['post_excerpt'], - 'title' => $post_data['post_title'], - ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/json' ); - $request->set_body( wp_json_encode( $autosave_data ) ); - - $response = rest_get_server()->dispatch( $request ); - $new_data = $response->get_data(); - $current_post = get_post( $post_id ); - - $this->assertEquals( $current_post->ID, $new_data['parent'] ); - - // The draft post shouldn't change. - $this->assertEquals( $current_post->post_title, $post_data['post_title'] ); - $this->assertEquals( $current_post->post_content, $post_data['post_content'] ); - $this->assertEquals( $current_post->post_excerpt, $post_data['post_excerpt'] ); - - $autosave_post = wp_get_post_autosave( $post_id ); - - // No changes. - $this->assertEquals( $current_post->post_title, $autosave_post->post_title ); - $this->assertEquals( $current_post->post_excerpt, $autosave_post->post_excerpt ); - - // Has changes. - $this->assertEquals( $autosave_data['content'], $autosave_post->post_content ); - - wp_delete_post( $post_id ); - } - - public function test_get_additional_field_registration() { - $schema = array( - 'type' => 'integer', - 'description' => 'Some integer of mine', - 'enum' => array( 1, 2, 3, 4 ), - 'context' => array( 'view', 'edit' ), - ); - - register_rest_field( - 'post-revision', - 'my_custom_int', - array( - 'schema' => $schema, - 'get_callback' => array( $this, 'additional_field_get_callback' ), - 'update_callback' => array( $this, 'additional_field_update_callback' ), - ) - ); - - $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/posts/' . self::$post_id . '/autosaves' ); - - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - - $this->assertArrayHasKey( 'my_custom_int', $data['schema']['properties'] ); - $this->assertEquals( $schema, $data['schema']['properties']['my_custom_int'] ); - - wp_set_current_user( 1 ); - - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertArrayHasKey( 'my_custom_int', $response->data ); - - global $wp_rest_additional_fields; - $wp_rest_additional_fields = array(); - } - - public function additional_field_get_callback( $object ) { - return get_post_meta( $object['id'], 'my_custom_int', true ); - } - - public function additional_field_update_callback( $value, $post ) { - update_post_meta( $post->ID, 'my_custom_int', $value ); - } - - protected function check_get_autosave_response( $response, $autosave ) { - if ( $response instanceof WP_REST_Response ) { - $links = $response->get_links(); - $response = $response->get_data(); - } else { - $this->assertArrayHasKey( '_links', $response ); - $links = $response['_links']; - } - - $this->assertEquals( $autosave->post_author, $response['author'] ); - - $rendered_content = apply_filters( 'the_content', $autosave->post_content ); - $this->assertEquals( $rendered_content, $response['content']['rendered'] ); - - $this->assertEquals( mysql_to_rfc3339( $autosave->post_date ), $response['date'] ); //@codingStandardsIgnoreLine - $this->assertEquals( mysql_to_rfc3339( $autosave->post_date_gmt ), $response['date_gmt'] ); //@codingStandardsIgnoreLine - - $rendered_guid = apply_filters( 'get_the_guid', $autosave->guid, $autosave->ID ); - $this->assertEquals( $rendered_guid, $response['guid']['rendered'] ); - - $this->assertEquals( $autosave->ID, $response['id'] ); - $this->assertEquals( mysql_to_rfc3339( $autosave->post_modified ), $response['modified'] ); //@codingStandardsIgnoreLine - $this->assertEquals( mysql_to_rfc3339( $autosave->post_modified_gmt ), $response['modified_gmt'] ); //@codingStandardsIgnoreLine - $this->assertEquals( $autosave->post_name, $response['slug'] ); - - $rendered_title = get_the_title( $autosave->ID ); - $this->assertEquals( $rendered_title, $response['title']['rendered'] ); - - $parent = get_post( $autosave->post_parent ); - $parent_controller = new WP_REST_Posts_Controller( $parent->post_type ); - $parent_object = get_post_type_object( $parent->post_type ); - $parent_base = ! empty( $parent_object->rest_base ) ? $parent_object->rest_base : $parent_object->name; - $this->assertEquals( rest_url( '/wp/v2/' . $parent_base . '/' . $autosave->post_parent ), $links['parent'][0]['href'] ); - } - - public function test_get_item_sets_up_postdata() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/autosaves/' . self::$autosave_post_id ); - rest_get_server()->dispatch( $request ); - - $post = get_post(); - $parent_post_id = wp_is_post_revision( $post->ID ); - - $this->assertEquals( $post->ID, self::$autosave_post_id ); - $this->assertEquals( $parent_post_id, self::$post_id ); - } - - public function test_update_item_draft_page_with_parent() { - wp_set_current_user( self::$editor_id ); - $request = new WP_REST_Request( 'POST', '/wp/v2/pages/' . self::$child_draft_page_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/x-www-form-urlencoded' ); - - $params = $this->set_post_data( - array( - 'id' => self::$child_draft_page_id, - 'author' => self::$editor_id, - ) - ); - - $request->set_body_params( $params ); - $response = rest_get_server()->dispatch( $request ); - $data = $response->get_data(); - - $this->assertEquals( self::$child_draft_page_id, $data['id'] ); - $this->assertEquals( self::$parent_page_id, $data['parent'] ); - } - - public function test_schema_validation_is_applied() { - wp_set_current_user( self::$editor_id ); - - $request = new WP_REST_Request( 'POST', '/wp/v2/pages/' . self::$draft_page_id . '/autosaves' ); - $request->add_header( 'content-type', 'application/x-www-form-urlencoded' ); - - $params = $this->set_post_data( - array( - 'id' => self::$draft_page_id, - 'comment_status' => 'garbage', - ) - ); - - $request->set_body_params( $params ); - - $response = rest_get_server()->dispatch( $request ); - $this->assertNotEquals( 'garbage', get_post( self::$draft_page_id )->comment_status ); - } -} diff --git a/phpunit/class-wp-rest-dummy-search-handler.php b/phpunit/class-wp-rest-dummy-search-handler.php deleted file mode 100644 index e6cc5b2f475f01..00000000000000 --- a/phpunit/class-wp-rest-dummy-search-handler.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * REST API: WP_REST_Dummy_Search_Handler class - * - * @package gutenberg - */ - -/** - * Test class extending WP_REST_Search_Handler - */ -class WP_REST_Dummy_Search_Handler extends WP_REST_Search_Handler { - - protected $items = array(); - - public function __construct( $amount = 10 ) { - $this->type = 'dummy'; - - $this->subtypes = array( 'dummy_first_type', 'dummy_second_type' ); - - $this->items = array(); - for ( $i = 1; $i <= $amount; $i++ ) { - $subtype = $i > $amount / 2 ? 'dummy_second_type' : 'dummy_first_type'; - - $this->items[ $i ] = (object) array( - 'dummy_id' => $i, - 'dummy_title' => sprintf( 'Title %d', $i ), - 'dummy_url' => sprintf( home_url( '/dummies/%d' ), $i ), - 'dummy_type' => $subtype, - ); - } - } - - public function search_items( WP_REST_Request $request ) { - $subtypes = $request[ WP_REST_Search_Controller::PROP_SUBTYPE ]; - if ( in_array( WP_REST_Search_Controller::TYPE_ANY, $subtypes, true ) ) { - $subtypes = $this->subtypes; - } - - $results = array(); - foreach ( $subtypes as $subtype ) { - $results = array_merge( $results, wp_list_filter( array_values( $this->items ), array( 'dummy_type' => $subtype ) ) ); - } - - $results = wp_list_sort( $results, 'dummy_id', 'DESC' ); - - $number = (int) $request['per_page']; - $offset = (int) $request['per_page'] * ( (int) $request['page'] - 1 ); - - $total = count( $results ); - - $results = array_slice( $results, $offset, $number ); - - return array( - self::RESULT_IDS => wp_list_pluck( $results, 'dummy_id' ), - self::RESULT_TOTAL => $total, - ); - } - - public function prepare_item( $id, array $fields ) { - $dummy = $this->items[ $id ]; - - $data = array(); - - if ( in_array( WP_REST_Search_Controller::PROP_ID, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_ID ] = (int) $dummy->dummy_id; - } - - if ( in_array( WP_REST_Search_Controller::PROP_TITLE, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_TITLE ] = $dummy->dummy_title; - } - - if ( in_array( WP_REST_Search_Controller::PROP_URL, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_URL ] = $dummy->dummy_url; - } - - if ( in_array( WP_REST_Search_Controller::PROP_TYPE, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_TYPE ] = $this->type; - } - - if ( in_array( WP_REST_Search_Controller::PROP_SUBTYPE, $fields, true ) ) { - $data[ WP_REST_Search_Controller::PROP_SUBTYPE ] = $dummy->dummy_type; - } - - return $data; - } - - public function prepare_item_links( $id ) { - return array(); - } -} diff --git a/phpunit/class-wp-rest-themes-controller-test.php b/phpunit/class-wp-rest-themes-controller-test.php deleted file mode 100644 index 553799a7beb0bd..00000000000000 --- a/phpunit/class-wp-rest-themes-controller-test.php +++ /dev/null @@ -1,344 +0,0 @@ -<?php -/** - * Unit tests covering WP_REST_Themes_Controller functionality. - * - * @package WordPress - * @subpackage REST API - */ - -/** - * @group restapi-themes - * @group restapi - */ -class WP_REST_Themes_Controller_Test extends WP_Test_REST_Controller_Testcase { - /** - * Subscriber user ID. - * - * @since 5.0.0 - * - * @var int $subscriber_id - */ - protected static $subscriber_id; - - /** - * Contributor user ID. - * - * @since 5.0.0 - * - * @var int $contributor_id - */ - protected static $contributor_id; - - /** - * The current theme object. - * - * @since 5.0.0 - * - * @var WP_Theme $current_theme - */ - protected static $current_theme; - - /** - * The REST API route for the active theme. - * - * @since 5.0.0 - * - * @var string $themes_route - */ - protected static $themes_route = '/wp/v2/themes'; - - /** - * Performs a REST API request for the active theme. - * - * @since 5.0.0 - * - * @param string $method Optional. Request method. Default GET. - * @return WP_REST_Response The request's response. - */ - protected function perform_active_theme_request( $method = 'GET' ) { - $request = new WP_REST_Request( $method, self::$themes_route ); - $request->set_param( 'status', 'active' ); - - return rest_get_server()->dispatch( $request ); - } - - /** - * Check that common properties are included in a response. - * - * @since 5.0.0 - * - * @param WP_REST_Response $response Current REST API response. - */ - protected function check_get_theme_response( $response ) { - if ( $response instanceof WP_REST_Response ) { - $headers = $response->get_headers(); - $response = $response->get_data(); - } else { - $headers = array(); - } - - $this->assertArrayHasKey( 'X-WP-Total', $headers ); - $this->assertEquals( 1, $headers['X-WP-Total'] ); - $this->assertArrayHasKey( 'X-WP-TotalPages', $headers ); - $this->assertEquals( 1, $headers['X-WP-TotalPages'] ); - } - - /** - * Set up class test fixtures. - * - * @since 5.0.0 - * - * @param WP_UnitTest_Factory $factory WordPress unit test factory. - */ - public static function wpSetUpBeforeClass( $factory ) { - self::$subscriber_id = $factory->user->create( - array( - 'role' => 'subscriber', - ) - ); - self::$contributor_id = $factory->user->create( - array( - 'role' => 'contributor', - ) - ); - self::$current_theme = wp_get_theme(); - - wp_set_current_user( self::$contributor_id ); - } - - /** - * Clean up test fixtures. - * - * @since 5.0.0 - */ - public static function wpTearDownAfterClass() { - self::delete_user( self::$subscriber_id ); - self::delete_user( self::$contributor_id ); - } - - /** - * Set up each test method. - * - * @since 5.0.0 - */ - public function setUp() { - parent::setUp(); - - wp_set_current_user( self::$contributor_id ); - } - - /** - * Theme routes should be registered correctly. - */ - public function test_register_routes() { - $routes = rest_get_server()->get_routes(); - $this->assertArrayHasKey( self::$themes_route, $routes ); - } - - /** - * Test retrieving a collection of themes. - */ - public function test_get_items() { - $response = self::perform_active_theme_request(); - - $this->assertEquals( 200, $response->get_status() ); - $data = $response->get_data(); - - $this->check_get_theme_response( $response ); - $fields = array( - 'theme_supports', - ); - $this->assertEqualSets( $fields, array_keys( $data[0] ) ); - } - - /** - * An error should be returned when the user does not have the edit_posts capability. - */ - public function test_get_items_no_permission() { - wp_set_current_user( self::$subscriber_id ); - $response = self::perform_active_theme_request(); - $this->assertErrorResponse( 'rest_user_cannot_view', $response, 403 ); - } - - /** - * Test an item is prepared for the response. - */ - public function test_prepare_item() { - $response = self::perform_active_theme_request(); - $this->assertEquals( 200, $response->get_status() ); - $this->check_get_theme_response( $response ); - } - - /** - * Verify the theme schema. - */ - public function test_get_item_schema() { - $response = self::perform_active_theme_request( 'OPTIONS' ); - $data = $response->get_data(); - $properties = $data['schema']['properties']; - $this->assertEquals( 1, count( $properties ) ); - $this->assertArrayHasKey( 'theme_supports', $properties ); - - $this->assertEquals( 3, count( $properties['theme_supports']['properties'] ) ); - $this->assertArrayHasKey( 'formats', $properties['theme_supports']['properties'] ); - $this->assertArrayHasKey( 'post-thumbnails', $properties['theme_supports']['properties'] ); - $this->assertArrayHasKey( 'responsive-embeds', $properties['theme_supports']['properties'] ); - } - - /** - * Should include relevant data in the 'theme_supports' key. - */ - public function test_theme_supports_formats() { - remove_theme_support( 'post-formats' ); - $response = self::perform_active_theme_request(); - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertTrue( isset( $result[0]['theme_supports']['formats'] ) ); - $this->assertSame( array( 'standard' ), $result[0]['theme_supports']['formats'] ); - } - - /** - * Test when a theme only supports some post formats. - */ - public function test_theme_supports_formats_non_default() { - add_theme_support( 'post-formats', array( 'aside', 'video' ) ); - $response = self::perform_active_theme_request(); - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertTrue( isset( $result[0]['theme_supports']['formats'] ) ); - $this->assertSame( array( 'standard', 'aside', 'video' ), $result[0]['theme_supports']['formats'] ); - } - - /** - * Test when a theme does not support responsive embeds. - */ - public function test_theme_supports_responsive_embeds_false() { - remove_theme_support( 'responsive-embeds' ); - $response = self::perform_active_theme_request(); - - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertTrue( isset( $result[0]['theme_supports']['responsive-embeds'] ) ); - $this->assertFalse( $result[0]['theme_supports']['responsive-embeds'] ); - } - - /** - * Test when a theme supports responsive embeds. - */ - public function test_theme_supports_responsive_embeds_true() { - remove_theme_support( 'responsive-embeds' ); - add_theme_support( 'responsive-embeds' ); - $response = self::perform_active_theme_request(); - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertTrue( $result[0]['theme_supports']['responsive-embeds'] ); - } - - /** - * Test when a theme does not support post thumbnails. - */ - public function test_theme_supports_post_thumbnails_false() { - remove_theme_support( 'post-thumbnails' ); - $response = self::perform_active_theme_request(); - - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertTrue( isset( $result[0]['theme_supports']['post-thumbnails'] ) ); - $this->assertFalse( $result[0]['theme_supports']['post-thumbnails'] ); - } - - /** - * Test when a theme supports all post thumbnails. - */ - public function test_theme_supports_post_thumbnails_true() { - remove_theme_support( 'post-thumbnails' ); - add_theme_support( 'post-thumbnails' ); - $response = self::perform_active_theme_request(); - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertTrue( $result[0]['theme_supports']['post-thumbnails'] ); - } - - /** - * Test when a theme only supports post thumbnails for certain post types. - */ - public function test_theme_supports_post_thumbnails_array() { - remove_theme_support( 'post-thumbnails' ); - add_theme_support( 'post-thumbnails', array( 'post' ) ); - $response = self::perform_active_theme_request(); - $result = $response->get_data(); - $this->assertTrue( isset( $result[0]['theme_supports'] ) ); - $this->assertEquals( array( 'post' ), $result[0]['theme_supports']['post-thumbnails'] ); - } - - /** - * It should be possible to register custom fields to the endpoint. - */ - public function test_get_additional_field_registration() { - $schema = array( - 'type' => 'integer', - 'description' => 'Some integer of mine', - 'enum' => array( 1, 2, 3, 4 ), - ); - - register_rest_field( - 'theme', - 'my_custom_int', - array( - 'schema' => $schema, - 'get_callback' => array( $this, 'additional_field_get_callback' ), - ) - ); - - $response = self::perform_active_theme_request( 'OPTIONS' ); - $data = $response->get_data(); - - $this->assertArrayHasKey( 'my_custom_int', $data['schema']['properties'] ); - $this->assertEquals( $schema, $data['schema']['properties']['my_custom_int'] ); - - $response = self::perform_active_theme_request( 'GET' ); - $data = $response->get_data(); - $this->assertArrayHasKey( 'my_custom_int', $data[0] ); - $this->assertSame( 2, $data[0]['my_custom_int'] ); - - global $wp_rest_additional_fields; - $wp_rest_additional_fields = array(); - } - - /** - * Return a value for the custom field. - * - * @since 5.0.0 - * - * @param array $theme Theme data array. - * @return int Additional field value. - */ - public function additional_field_get_callback( $theme ) { - return 2; - } - - /** - * The create_item() method does not exist for themes. - */ - public function test_create_item() {} - - /** - * The update_item() method does not exist for themes. - */ - public function test_update_item() {} - - /** - * The get_item() method does not exist for themes. - */ - public function test_get_item() {} - - /** - * The delete_item() method does not exist for themes. - */ - public function test_delete_item() {} - - /** - * Context is not supported for themes. - */ - public function test_context_param() {} -} From e1d2e66bcea435fceb9b868124a8b51d4a43ff27 Mon Sep 17 00:00:00 2001 From: Karol Gorski <naerriel@gmail.com> Date: Wed, 23 Jan 2019 18:20:58 +0100 Subject: [PATCH 46/56] Dismissible-notices: fix text overlapping icon (X) (#13371) * Dismissible-notices: fix text overlapping icon (X) * Dismissible-notices: fix text overlapping icon (X) - pt.2. --- packages/components/src/notice/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/notice/style.scss b/packages/components/src/notice/style.scss index b9f182374e2e41..31b364c7e21a6c 100644 --- a/packages/components/src/notice/style.scss +++ b/packages/components/src/notice/style.scss @@ -26,7 +26,7 @@ } .components-notice__content { - margin: 1em 0; + margin: 1em #{ $icon-button-size-small + $border-width } 1em 0; } .components-notice__action.components-button { From 50ab754503b020fde33185dada9e5e06d51f7cb9 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak <marcus@mkaz.com> Date: Wed, 23 Jan 2019 09:34:33 -0800 Subject: [PATCH 47/56] Update and Organize Contributors Guide per #12916 (#13352) * Organize and reorder Contributors Guide per #12916 * Remove individual outreach pages, combined into single outreach.md * Principles link, sections heading * Fix link * Fix link, typo * Update docs/contributors/readme.md Co-Authored-By: mkaz <marcus@mkaz.com> * Remove meetups, there are far too many to list, since most meetups now all cover Gutenberg in some degree or other * Update CONTRIBUTING with links to Documentation section * Update CONTRIBUTING.md Co-Authored-By: mkaz <marcus@mkaz.com> * Update CONTRIBUTING.md Co-Authored-By: mkaz <marcus@mkaz.com> * Update CONTRIBUTING.md Co-Authored-By: mkaz <marcus@mkaz.com> * Update docs/contributors/outreach.md Co-Authored-By: mkaz <marcus@mkaz.com> * Update docs/contributors/outreach.md Co-Authored-By: mkaz <marcus@mkaz.com> * Update docs/contributors/document.md Co-Authored-By: mkaz <marcus@mkaz.com> * Update docs/contributors/document.md Co-Authored-By: mkaz <marcus@mkaz.com> * Add some newlines, take some away * Paragraph for resources * Update title in generator * Update docs/contributors/develop.md Co-Authored-By: mkaz <marcus@mkaz.com> --- CONTRIBUTING.md | 24 ++--- bin/generate-public-grammar.js | 2 +- docs/contributors/copy-guide.md | 30 +++--- docs/contributors/design.md | 2 +- docs/contributors/develop.md | 11 ++ docs/contributors/document.md | 34 +++++++ docs/contributors/grammar.md | 2 +- docs/contributors/outreach.md | 64 +++++++++--- docs/contributors/outreach/articles.md | 30 ------ docs/contributors/outreach/meetups.md | 17 ---- docs/contributors/outreach/resources.md | 11 -- docs/contributors/outreach/talks.md | 17 ---- docs/contributors/readme.md | 17 +++- docs/grammar.md | 6 ++ docs/manifest.json | 130 +++++++++++------------- docs/toc.json | 37 ++++--- 16 files changed, 215 insertions(+), 219 deletions(-) create mode 100644 docs/contributors/develop.md create mode 100644 docs/contributors/document.md delete mode 100644 docs/contributors/outreach/articles.md delete mode 100644 docs/contributors/outreach/meetups.md delete mode 100644 docs/contributors/outreach/resources.md delete mode 100644 docs/contributors/outreach/talks.md create mode 100644 docs/grammar.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41fbdc022d8f65..576e78b27a3eeb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,10 +4,12 @@ Thank you for thinking about contributing to WordPress' Gutenberg project! If yo As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our [Code of Conduct](/CODE_OF_CONDUCT.md). -Before contributing, we encourage you to read our [Contributing Policy](/CONTRIBUTING.md) (you're here already!) and our [Handbook](https://wordpress.org/gutenberg/handbook/). If you have any questions on any of these, please open an issue so we can help clarify them. +Before contributing, we encourage you to review the [Contributor Handbook](https://wordpress.org/gutenberg/handbook/contributors/). If you have any questions, please ask, either in Slack or open an issue in GitHub so we can help clarify. All WordPress projects are [licensed under the GPLv2+](/LICENSE.md), and all contributions to Gutenberg will be released under the GPLv2+ license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv2+ license. +This document covers the technical details around setup, and submitting your contribution to the Gutenberg project. + ## Getting Started Gutenberg is a Node.js-based project, built primarily in JavaScript. @@ -114,7 +116,7 @@ Gutenberg contains both PHP and JavaScript code and encourages testing and code This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation. -Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section. +Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section. ## How Can Designers Contribute? @@ -122,23 +124,9 @@ If you'd like to contribute to the design or front-end, feel free to contribute ## Contribute to the Documentation -Documentation is automatically synced from master to the [Gutenberg Documentation Website](https://wordpress.org/gutenberg/handbook/) every 15 minutes. - -To add a new documentation page, you'll have to create a Markdown file in the [docs](https://github.com/WordPress/gutenberg/tree/master/docs) folder and add an item to the [toc.json](/docs/toc.json). - -### Using links - -It's very likely that at some point you will want to link to other documentation pages. It's worth emphasizing that all documents can be browsed in different contexts: -- Gutenberg Handbook -- GitHub website -- npm website - -That's why it's recommended to use absolute links without the `https://github.com/WordPress/gutenberg` part for all files which match the following patterns: -- `/docs/*.md` -- `/packages/*/README.md` -- `/packages/components/src/**/README.md` +Please see the [Documentation section](/docs/contributors/document.md) of the Contributor Handbook. -This way they will be properly handled in all three aforementioned contexts. +Documentation is automatically synced from `master` to the [Gutenberg Handbook](https://wordpress.org/gutenberg/handbook/) every 15 minutes. ### `@wordpress/component` diff --git a/bin/generate-public-grammar.js b/bin/generate-public-grammar.js index a049d1674f36db..c56ec4398a8941 100755 --- a/bin/generate-public-grammar.js +++ b/bin/generate-public-grammar.js @@ -93,7 +93,7 @@ function flatten( expression ) { fs.writeFileSync( path.join( __dirname, '..', 'docs', 'grammar.md' ), ` -# The Gutenberg block grammar +# Block Grammar ${ flatten( grammar ) } ` ); diff --git a/docs/contributors/copy-guide.md b/docs/contributors/copy-guide.md index 5e0066a689604c..e5505e30f3acbe 100644 --- a/docs/contributors/copy-guide.md +++ b/docs/contributors/copy-guide.md @@ -1,4 +1,4 @@ -# Gutencopy Guidelines +# Copy Guidelines ## Longer Text Guidelines for writing multi-line/step instructions or narrative introductions/orientation to pages or features. @@ -8,7 +8,7 @@ This will obviously vary quite a lot depending on the context, but here are some #### ONE: Contractions are your friends! They’re more conversational, and a simple way to make text sound friendlier and less formal. (And they save a bit of space as well: a win-win.) -#### TWO: Cut phrases that inflate your word count without actually adding meaning. +#### TWO: Cut phrases that inflate your word count without actually adding meaning. This happens frequently in two specific instances. First, when writing in the passive voice: > This block can be used to display single images. @@ -25,7 +25,7 @@ Does it or doesn’t it? We’re making this software: we’re allowed to be dec > The gallery block displays multiple images in an elegant layout. -We also all do this a lot with the phrase “allows you to.” +We also all do this a lot with the phrase “allows you to.” > Preformatted text allows you to keep your tabs and line breaks. @@ -33,9 +33,9 @@ Features don’t allow anyone to do anything; they’re just tools that do speci > Preformatted text preserves your tabs and line breaks. -The more direct sentences are almost always clearer. Scan your copy for the words “can,” “be,” “might,” “allows you to,” and “helps”—they’re the most common culprits, and looking for those words specifically is a way to locate phrasing you can tighten up. +The more direct sentences are almost always clearer. Scan your copy for the words “can,” “be,” “might,” “allows you to,” and “helps”—they’re the most common culprits, and looking for those words specifically is a way to locate phrasing you can tighten up. -#### THREE: Beware of “simple,” “easy,” and “just.” +#### THREE: Beware of “simple,” “easy,” and “just.” It is not for us to decide what is simple: it’s for the user to decide. If we say something is easy and the user doesn’t have an easy experience, it undermines their trust in us and what we’re building. Same goes for “just”—many of us know to avoid “simple,” but still use “just” all the time. “Just click here.” “Just enter your username.” It’s the same thing: it implies that something will be no big deal, but we can’t know what the user will find to be a big deal. It’s also safer and more helpful to be specific. “Easy” and “simple” are shorthand for explanations that we haven’t written; whenever you see them, take a minute to think about what they’re standing in for. Maybe “It’s easy to add a block by hitting ‘enter’” really means “You can add more content to the page without taking your hands off the keyboard.” Great! Say the specific thing instead of relying on “easy.” @@ -43,7 +43,7 @@ It’s also safer and more helpful to be specific. “Easy” and “simple” a This isn’t to say that you should banish these words from your vocabulary. You might want to write a tooltip describing how the cover image block now requires less configuration, or an email about how we’re building a tool for quick creation of custom blocks, and you could legitimately say that the cover image block has been simplified or that we’re working to make custom block creation easier—there, the terms are descriptive and relative. But be on the lookout for ways you might be using (or overusing) them to make absolute claims that something is easy or simple, and use those as opportunities to be more specific and clear. #### FOUR: Look out for “we.” -Any time text or instructions uses “we” a lot, it means the focus of the text is on the people behind the software and not the people using the software. Sometimes that’s what you actually want—but it’s usually not. The focus should typically be on the user, what they need, and how they benefit rather than “what we did” or “what we want.” +Any time text or instructions uses “we” a lot, it means the focus of the text is on the people behind the software and not the people using the software. Sometimes that’s what you actually want—but it’s usually not. The focus should typically be on the user, what they need, and how they benefit rather than “what we did” or “what we want.” We’re the only ones that care about what we did or want; the user just wants software that works. If you see a lot of “we”s, think about whether you should reframe what you’re writing to focus on the benefits to and successes of the user. @@ -51,7 +51,7 @@ We’re the only ones that care about what we did or want; the user just wants s Guidelines for (duh) writing bulleted lists. #### ONE: Keep sentence structures parallel across all bullets. -Parallel structure makes lists easier to read quickly—their predictability takes some cognitive load off the reader. +Parallel structure makes lists easier to read quickly—their predictability takes some cognitive load off the reader. GOOD: > What can you do with this block? Lots of things! @@ -60,7 +60,7 @@ GOOD: > * Display multiple images. > * Create a bulleted list. -Every bullet is a full sentence, and ends with a period. (If your list is a bunch of one- or two-word items, those can often just turn into a single regular sentence—easier to read, and space-saving.) Every line begins with a verb that tells the user what the block can do. The subject of the sentence is always the user. +Every bullet is a full sentence, and ends with a period. (If your list is a bunch of one- or two-word items, those can often just turn into a single regular sentence—easier to read, and space-saving.) Every line begins with a verb that tells the user what the block can do. The subject of the sentence is always the user. A user can absorb this list quickly because once they read the first item, they understand how to read the rest and know what information they’ll find. @@ -101,7 +101,7 @@ If your list is more persuasive (e.g., trying to convince someone to use a featu >* Use it to highlight a link you love—sharing links is the currency of the internet. >* Create a gallery that displays multiple images, and show off your best photos. -These aren’t hard-and-fast rules—you might choose the use the same verb in a persuasive list to be more focused and powerful, for example. But they’re good starting places for solid lists. +These aren’t hard-and-fast rules—you might choose the use the same verb in a persuasive list to be more focused and powerful, for example. But they’re good starting places for solid lists. #### THREE: When something's clearly a list, you don't have to tell us it's a list. @@ -120,7 +120,7 @@ LESS GOOD: Find the balance between being as clear as possible and trusting a user. On one hand, we know that people don’t always read instructions; on the other, redundancy can make the user feel like we think they’re stupid. #### FOUR: Bold is sometimes your friend. -Use it to focus readers on the key information in a bulleted list. This is especially useful when your bullets include some supplemental but ultimately secondary information. +Use it to focus readers on the key information in a bulleted list. This is especially useful when your bullets include some supplemental but ultimately secondary information. “Key information” is, well, key: bold draws the eye, so stick to the most vital piece of information in a given bullet: @@ -136,7 +136,7 @@ On the flipside, bolding too many things creates visual confusion: > * Use it to highlight a **link** you love—sharing **links** is the currency of the internet. > * Create a **gallery** that displays **multiple images**, and show off your best **photos**. -When lists are short and basic, don't bother—bolding just adds busy-ness. +When lists are short and basic, don't bother—bolding just adds busy-ness. > What can you do with this block? Lots of things! > * Add a **quote**. @@ -148,7 +148,7 @@ The lack of words creates its own focus; you don't have to add any more. ## UI Descriptions Guidelines for writing one-line feature descriptions, or short descriptions to clarify options. -#### ONE: Clarity above all! +#### ONE: Clarity above all! If the user doesn't understand what using a particular option will result in, it doesn't matter how clever your pun is. Wordplay and idioms are frequently unclear, and easily misunderstood. If you use them at all, they should be as supplemental information— never to explain the main idea—and they should be something you’re fairly certain will be understandable to a pretty wide range of people. #### TWO: Refer back to section one, and look out for those bulk-adding phrases. @@ -187,7 +187,7 @@ And when something means everything, it actually means nothing. The more specifi #### FOUR: This is still writing. It should have personality and interest. Clarity above all, yes, and space is often limited here—but UI text can still be interesting to read. -Single lines of description can still be complete sentences. +Single lines of description can still be complete sentences. > List. Numbered or bulleted. @@ -195,7 +195,7 @@ vs. > Add a list, either numbered or bulleted. -You can still use contractions. +You can still use contractions. > Add a list. We will provide formatting options. @@ -203,7 +203,7 @@ vs. > Add a bulleted list—we’ll give you some formatting options. -You can still use punctuation—em dashes, colons, semicolons—to control the flow of your words, link ideas, and create pauses. +You can still use punctuation—em dashes, colons, semicolons—to control the flow of your words, link ideas, and create pauses. > List. Numbered or bulleted. diff --git a/docs/contributors/design.md b/docs/contributors/design.md index 7b037fd3a4c946..bd68ba060718ed 100644 --- a/docs/contributors/design.md +++ b/docs/contributors/design.md @@ -1,4 +1,4 @@ -# Gutenberg Design Principles & Vision +# Design Principles & Vision This is a living document that outlines the design principles and patterns of the editor interface. Its aim is to explain the background of the design, inform future improvements, and help people design great blocks. diff --git a/docs/contributors/develop.md b/docs/contributors/develop.md new file mode 100644 index 00000000000000..97fa91aab0f78d --- /dev/null +++ b/docs/contributors/develop.md @@ -0,0 +1,11 @@ +# Developer Contributions + +Please see [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for technical details on how to setup and make contributions to the Gutenberg repository. + +The following resources offer additional information for developers who wish to contribute to Gutenberg: + +* [Coding Guidelines](/docs/contributors/coding-guidelines.md) outline additional patterns and conventions used in the Gutenberg project. +* [Gutenberg Block Grammar](/docs/contributors/grammar.md) +* [Testing Overview](/docs/contributors/testing-overview.md) for PHP and JavaScript development in Gutenberg. +* [Scripts](/docs/contributors/scripts.md) a list of vendor and internal scripts available to plugin developers. +* [Gutenberg Release Process](/docs/contributors/release.md) a checklist for the different type of releases for Gutenberg project. diff --git a/docs/contributors/document.md b/docs/contributors/document.md new file mode 100644 index 00000000000000..f51578d99e3c31 --- /dev/null +++ b/docs/contributors/document.md @@ -0,0 +1,34 @@ +# Documentation Contributions + +Documentation for Gutenberg is maintained in the `/docs/` directory in the same Gutenberg Github repository. The docs are published every 15 minutes to the [Gutenberg Handbook site](https://wordpress.org/gutenberg/handbook/). + +## New Document + +To add a new documentation page: + +1. Create a Markdown file in the [docs](https://github.com/WordPress/gutenberg/tree/master/docs) folder +2. Add item to the [toc.json](https://github.com/WordPress/gutenberg/blob/master/docs/toc.json) hierarchy +3. Update manifest.json by running `npm run docs:build` +4. Commit manifest.json with other files updated + +## Using Links + +It's very likely that at some point you will want to link to other documentation pages. It's worth emphasizing that all documents can be browsed in different contexts: + +- Gutenberg Handbook +- GitHub website +- npm website + +To create links that work in all contexts, you should use absolute path links without the `https://github.com/WordPress/gutenberg` prefix. You can reference files using the following patterns: + +- `/docs/*.md` +- `/packages/*/README.md` +- `/packages/components/src/**/README.md` + +This way they will be properly handled in all three aforementioned contexts. + +## Resources + +* [Copy Guidelines](/docs/contributors/copy-guide.md) for writing instructions, documentations, or other contributions to Gutenberg project. + +* [Tone and Voice Guide](https://make.wordpress.org/docs/handbook/documentation-team-handbook/tone-and-voice-guide/) from WordPress Documentation. diff --git a/docs/contributors/grammar.md b/docs/contributors/grammar.md index ac6015b9a2dc70..7d7e9bf73b8c04 100644 --- a/docs/contributors/grammar.md +++ b/docs/contributors/grammar.md @@ -1,5 +1,5 @@ -# The Gutenberg block grammar +# Block Grammar <dl><dt></dt><dd><pre><header>Block_List</header> = $(!Block .)* (Block $(!Block .)*)* $(.*)</pre></dd><dt></dt><dd><pre><header>Block</header> = Block_Void / Block_Balanced</pre></dd><dt></dt><dd><pre><header>Block_Void</header> = "&lt;!--" __ "wp:" Block_Name __ (Block_Attributes __)? "/-->"</pre></dd><dt></dt><dd><pre><header>Block_Balanced</header> = Block_Start (Block / $(!Block_End .))* Block_End</pre></dd><dt></dt><dd><pre><header>Block_Start</header> = "&lt;!--" __ "wp:" Block_Name __ (Block_Attributes __)? "-->"</pre></dd><dt></dt><dd><pre><header>Block_End</header> = "&lt;!--" __ "/wp:" Block_Name __ "-->"</pre></dd><dt></dt><dd><pre><header>Block_Name</header> = Namespaced_Block_Name diff --git a/docs/contributors/outreach.md b/docs/contributors/outreach.md index 9df69e7ac58b6c..208a1eaf707e14 100644 --- a/docs/contributors/outreach.md +++ b/docs/contributors/outreach.md @@ -1,8 +1,58 @@ # Outreach -This will include talks, meetups and anything the community is doing to discuss, learn about, and contribute to Gutenberg. This is not an exhaustive list, if we are missing your event just let us know. +This includes articles, talks, demos and anything the community is doing to discuss, learn about, and contribute to Gutenberg. This is not an exhaustive list; if we are missing your event or article, just let us know. + +## Articles + +A short list of useful articles around defining, extending, and contributing to Gutenberg. + +### Overviews of Gutenberg + +- [Gutenberg, or the Ship of Theseus](https://matiasventura.com/post/gutenberg-or-the-ship-of-theseus/), Matías Ventura Bausero (October 2017) +- [We Called It Gutenberg for a Reason](https://ma.tt/2017/08/we-called-it-gutenberg-for-a-reason/), Matt Mullenweg (August 2017) +- [How Gutenberg is Changing WordPress Development](https://riad.blog/2017/10/06/how-gutenberg-is-changing-wordpress-development/), Riad Benguella (October 2017) +- [How Gutenberg Will Shape the Future of WordPress](https://www.linkedin.com/pulse/gutenberg-morten-rand-hendriksen/), Morten Rand-Henrikson (August 2017) + +### Extending Gutenberg + +- [With Gutenberg, what happens to my Custom Fields?](https://riad.blog/2017/12/11/with-gutenberg-what-happens-to-my-custom-fields/), Riad Benguella (December 2017) +- [One thousand and one ways to extend Gutenberg today](https://riad.blog/2017/10/16/one-thousand-and-one-way-to-extend-gutenberg-today/), Riad Benguella (October 2017) +- [Gutenberg Plugin Boilerplate](https://github.com/ahmadawais/Gutenberg-Boilerplate/), Ahmad Awais (August 2017) + +### Community Contribution + +- [Gutenberg Block Library](https://editorblockswp.com/library), Danny Cooper (August 2018) +- [A zero-configuration developer toolkit for building WordPress Gutenberg block plugins](https://ahmadawais.com/create-guten-block-toolkit/), Ahmad Awais (January 2018) +- [Contributing to Gutenberg Without Code](https://wordimpress.com/a-pot-stirrer-amongst-chefs-contributing-to-gutenberg-without-code/), Kevin Hoffman (August 2017) +- [Testing Flow in Gutenberg: Instructions for how to contribute to usability testing](https://make.wordpress.org/test/2017/11/22/testing-flow-in-gutenberg/), Anna Harrison (November 2017) + +### Article Compilations + +- [Curated Collection of Gutenberg Articles, Plugins, Blocks, Tutorials, etc](http://gutenberghub.com/), By Munir Kamal +- [Articles about Gutenberg](https://github.com/WordPress/gutenberg/issues/1419) (Github Issue thread with links) +- [Gutenberg articles on ManageWP.org](https://managewp.org/search?q=gutenberg) +- [Gutenberg Times](https://gutenbergtimes.com/category/updates/) + +## Talks + +Talks given about Gutenberg, including slides and videos as they are available. + +### Slides +- [The new core WordPress editor](http://kimb.me/talk-bigwp-london-new-core-wordpress-editor/) at BigWP London (18. May 2017) +- [Gutenberg Notes](http://haiku2.com/2017/09/bend-wordpress-meetup-gutenberg-notes/) at Bend WordPress Meetup (5. September 2017) +- [Gutenberg and the Future of Content in WordPress](https://www.slideshare.net/andrewmduthie/gutenberg-and-the-future-of-content-in-wordpress) (20. September 2017) +- [Head first into Gutenberg](https://speakerdeck.com/prtksxna/head-first-into-gutenberg) at the [WordPress Goa Meet-up](https://www.meetup.com/WordPressGoa/events/245275573/) (1. December 2017) +- [Gutenberg : vers une approche plus fine du contenu](https://imathi.eu/2018/02/16/gutenberg-vers-une-approche-plus-fine-du-contenu/) at [WP Paris](https://wpparis.fr/) (8. February 2018) + +### Videos +- [All `Gutenberg` tagged Talks at WordPress.tv](https://wordpress.tv/tag/gutenberg/) +- 2018-Jun - [Beyond Gutenberg](https://wordpress.tv/2018/07/09/matias-ventura-beyond-gutenberg/) by Matías Ventura +- 2018-Jun - [Anatomy of a block: Gutenberg design patterns](https://wordpress.tv/2018/07/08/tammie-lister-anatomy-of-a-block-gutenberg-design-patterns/) by Tammie Lister +- 2017-Dec - [State of the Word 2017](https://wordpress.tv/2017/12/04/matt-mullenweg-state-of-the-word-2017/) by Matt Mullenweg (Gutenberg demo by Matías Ventura at 35:00) +- [Gutenberg is Coming (Don’t Be Afraid)](https://training.ithemes.com/webinar/gutenberg-is-coming-dont-be-afraid/) from iThemes Training ## Showcases or demonstrations: + https://wpleeds.co.uk/events/plugins-gutenberg-wordpress-leeds-july-2017/ http://kimb.me/talk-bigwp-london-new-core-wordpress-editor @@ -13,15 +63,3 @@ https://www.meetup.com/WordPress-Melbourne/events/241543639 https://wpmeetups.de/termin/29-wp-meetup-stuttgart-gutenberg-editor-rueckblick-wordcamp-europe/ -## Testing events: -https://www.meetup.com/Turku-WordPress-Meetup/events/241195076/ - -https://www.meetup.com/Vancouver-WordPress-Meetup-Group/events/241575161/ - -## Calls for testing: -https://make.wordpress.org/test/2017/06/27/call-for-testing-gutenberg/ - -http://www.wpswfl.org/new-wordpress-editor-gutenberg-early-beta-needs-testers/ - -https://gutenberg.eastbaywp.com - diff --git a/docs/contributors/outreach/articles.md b/docs/contributors/outreach/articles.md deleted file mode 100644 index fe4bce7e328a82..00000000000000 --- a/docs/contributors/outreach/articles.md +++ /dev/null @@ -1,30 +0,0 @@ -# Articles - -This includes useful articles for those wanting to run a meetup or promote Gutenberg. - -## Overviews of Gutenberg - -- [Gutenberg, or the Ship of Theseus](https://matiasventura.com/post/gutenberg-or-the-ship-of-theseus/), Matías Ventura Bausero (October 2017) -- [We Called It Gutenberg for a Reason](https://ma.tt/2017/08/we-called-it-gutenberg-for-a-reason/), Matt Mullenweg (August 2017) -- [How Gutenberg is Changing WordPress Development](https://riad.blog/2017/10/06/how-gutenberg-is-changing-wordpress-development/), Riad Benguella (October 2017) -- [How Gutenberg Will Shape the Future of WordPress](https://www.linkedin.com/pulse/gutenberg-morten-rand-hendriksen/), Morten Rand-Henrikson (August 2017) - -## Extending Gutenberg - -- [With Gutenberg, what happens to my Custom Fields?](https://riad.blog/2017/12/11/with-gutenberg-what-happens-to-my-custom-fields/), Riad Benguella (December 2017) -- [One thousand and one ways to extend Gutenberg today](https://riad.blog/2017/10/16/one-thousand-and-one-way-to-extend-gutenberg-today/), Riad Benguella (October 2017) -- [Gutenberg Plugin Boilerplate](https://github.com/ahmadawais/Gutenberg-Boilerplate/), Ahmad Awais (August 2017) - -## Community Contribution - -- [Gutenberg Block Library](https://editorblockswp.com/library), Danny Cooper (August 2018) -- [A zero-configuration developer toolkit for building WordPress Gutenberg block plugins](https://ahmadawais.com/create-guten-block-toolkit/), Ahmad Awais (January 2018) -- [Contributing to Gutenberg Without Code](https://wordimpress.com/a-pot-stirrer-amongst-chefs-contributing-to-gutenberg-without-code/), Kevin Hoffman (August 2017) -- [Testing Flow in Gutenberg: Instructions for how to contribute to usability testing](https://make.wordpress.org/test/2017/11/22/testing-flow-in-gutenberg/), Anna Harrison (November 2017) - -## Article Compilations - -- [Curated Collection of Gutenberg Articles, Plugins, Blocks, Tutorials, etc](http://gutenberghub.com/), By Munir Kamal -- [Articles about Gutenberg](https://github.com/WordPress/gutenberg/issues/1419) (Github Issue thread with links) -- [Gutenberg articles on ManageWP.org](https://managewp.org/search?q=gutenberg) -- [Gutenberg Times](https://gutenbergtimes.com/category/updates/) diff --git a/docs/contributors/outreach/meetups.md b/docs/contributors/outreach/meetups.md deleted file mode 100644 index 58cd8bbb72c992..00000000000000 --- a/docs/contributors/outreach/meetups.md +++ /dev/null @@ -1,17 +0,0 @@ -# Meetups - -A list of meetups about Gutenberg so far: - -- [Gutenberg and the Future of WordPress](https://www.meetup.com/Vancouver-WordPress-Meetup-Group/events/241575161/), Vancouver, Canada -- [Page builders and the upcoming Gutenberg Editor](https://www.meetup.com/Turku-WordPress-Meetup/events/241195076/), Turku, Finland -- [Discussion about Gutenberg](https://www.facebook.com/events/278785795934302/), Andria, Italy -- [Plugins and Gutenberg](https://wpleeds.co.uk/events/plugins-gutenberg-wordpress-leeds-july-2017/), Leeds, UK -- [Gutenberg Introduction & Demo](https://www.meetup.com/WordPress-Melbourne/events/241543639/), Melbourne, Australia -- [Gutenberg Editor & Review](https://wpmeetups.de/termin/29-wp-meetup-stuttgart-gutenberg-editor-rueckblick-wordcamp-europe/), WordCamp Europe -- [Diving into Gutenberg by Tammie Lister](https://www.meetup.com/Big-Media-Enterprise-WordPress-London-Meetup/events/243302081/), London, UK -- [What's New In WordPress 4.9 and Gutenberg 1.5](https://www.meetup.com/Tuscaloosa-WordPress-Meetup/events/244584939/), Tuscaloosa, Alabama, USA -- [WordPress & JavaScript: Let's talk Gutenberg!](https://www.meetup.com/WordPress-Lahore/events/246446478/), Lahore, PK -- [The state of Gutenberg](https://www.meetup.com/WP-Porto/events/245585131/), Porto, Portugal -- [Discuss and learn about the new WordPress Editor : Gutenberg](https://www.meetup.com/Pune-WordPress-Knowledge-Exchange/events/248496830/), Pune, India -- [An Introduction to Gutenberg](https://www.meetup.com/Okanagan-WordPress-Meetup/events/249167218/), Vernon, BC, Canada -- [WordPress 5.0 - Gutenberg is upon us](https://www.meetup.com/WordPress-Perth/events/249490075/), Perth, Australia diff --git a/docs/contributors/outreach/resources.md b/docs/contributors/outreach/resources.md deleted file mode 100644 index 3c5dd598f60858..00000000000000 --- a/docs/contributors/outreach/resources.md +++ /dev/null @@ -1,11 +0,0 @@ -# Resources - -All resources here can be used by anyone. Feel free to use the decks to make your own talks or to use the gifs in your blog posts and other resources. - -## Slidedecks to use - -- v1: https://cloudup.com/cqEJppQ8m-5 : August 2017 - -## Gif collection to use - -- https://cloudup.com/c9OKU3OJD9r diff --git a/docs/contributors/outreach/talks.md b/docs/contributors/outreach/talks.md deleted file mode 100644 index a21f9c468c4814..00000000000000 --- a/docs/contributors/outreach/talks.md +++ /dev/null @@ -1,17 +0,0 @@ -# Talks - -Talks given about Gutenberg, including slides and videos as they are available. - -## Slides -- [The new core WordPress editor](http://kimb.me/talk-bigwp-london-new-core-wordpress-editor/) at BigWP London (18. May 2017) -- [Gutenberg Notes](http://haiku2.com/2017/09/bend-wordpress-meetup-gutenberg-notes/) at Bend WordPress Meetup (5. September 2017) -- [Gutenberg and the Future of Content in WordPress](https://www.slideshare.net/andrewmduthie/gutenberg-and-the-future-of-content-in-wordpress) (20. September 2017) -- [Head first into Gutenberg](https://speakerdeck.com/prtksxna/head-first-into-gutenberg) at the [WordPress Goa Meet-up](https://www.meetup.com/WordPressGoa/events/245275573/) (1. December 2017) -- [Gutenberg : vers une approche plus fine du contenu](https://imathi.eu/2018/02/16/gutenberg-vers-une-approche-plus-fine-du-contenu/) at [WP Paris](https://wpparis.fr/) (8. February 2018) - -## Videos -- [All `Gutenberg` tagged Talks at WordPress.tv](https://wordpress.tv/tag/gutenberg/) -- 2018-Jun - [Beyond Gutenberg](https://wordpress.tv/2018/07/09/matias-ventura-beyond-gutenberg/) by Matías Ventura -- 2018-Jun - [Anatomy of a block: Gutenberg design patterns](https://wordpress.tv/2018/07/08/tammie-lister-anatomy-of-a-block-gutenberg-design-patterns/) by Tammie Lister -- 2017-Dec - [State of the Word 2017](https://wordpress.tv/2017/12/04/matt-mullenweg-state-of-the-word-2017/) by Matt Mullenweg (Gutenberg demo by Matías Ventura at 35:00) -- [Gutenberg is Coming (Don’t Be Afraid)](https://training.ithemes.com/webinar/gutenberg-is-coming-dont-be-afraid/) from iThemes Training diff --git a/docs/contributors/readme.md b/docs/contributors/readme.md index 1feaadfcbf5b9b..e3979c229e25c9 100644 --- a/docs/contributors/readme.md +++ b/docs/contributors/readme.md @@ -2,10 +2,17 @@ Welcome to the Gutenberg Project Contributors Guide. -The following guidelines are in place to create consistency across the project and the numerous contributors. See also the [Contributing Documentation](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for technical details around setup, and submitting your contributions. +The following guidelines are in place to create consistency across the project and the numerous contributors. See the [Contributing Documentation](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) for technical details around setup, and submitting your contributions. -* [Coding Guidelines](../../docs/contributors/coding-guidelines.md) outline additional patterns and conventions used in the Gutenberg project. -* [Copy Guidelines](../../docs/contributors/copy-guide.md) -* [Design Principles & Vision](../../docs/contributors/design.md) +## Philosophy + +* [Architecturial and UX Principles of Gutenberg](/docs/contributors/principles.md) + +## Sections + +The contributors guide has the following different sections by contribution type: + +* [Design Contributions](/docs/contributors/design.md) +* [Developer Contributions](/docs/contributors/develop.md) +* [Documentation Contributions](/docs/contributors/document.md) -Please see the table of contents on the left side of the Gutenberg Handbook for the full list of contributor resources. diff --git a/docs/grammar.md b/docs/grammar.md new file mode 100644 index 00000000000000..1bbe77dc5ecf09 --- /dev/null +++ b/docs/grammar.md @@ -0,0 +1,6 @@ + +# Block Grammar + +<dl><dt></dt><dd><pre><header>Block_List</header> = $(!Block .)* (Block $(!Block .)*)* $(.*)</pre></dd><dt></dt><dd><pre><header>Block</header> = Block_Void + / Block_Balanced</pre></dd><dt></dt><dd><pre><header>Block_Void</header> = "&lt;!--" __ "wp:" Block_Name __ (Block_Attributes __)? "/-->"</pre></dd><dt></dt><dd><pre><header>Block_Balanced</header> = Block_Start (Block / $(!Block !Block_End .)+)* Block_End</pre></dd><dt></dt><dd><pre><header>Block_Start</header> = "&lt;!--" __ "wp:" Block_Name __ (Block_Attributes __)? "-->"</pre></dd><dt></dt><dd><pre><header>Block_End</header> = "&lt;!--" __ "/wp:" Block_Name __ "-->"</pre></dd><dt></dt><dd><pre><header>Block_Name</header> = Namespaced_Block_Name + / Core_Block_Name</pre></dd><dt></dt><dd><pre><header>Namespaced_Block_Name</header> = $(Block_Name_Part "/" Block_Name_Part)</pre></dd><dt></dt><dd><pre><header>Core_Block_Name</header> = $(Block_Name_Part)</pre></dd><dt></dt><dd><pre><header>Block_Name_Part</header> = $([a-z] [a-z0-9_-]*)</pre></dd><dt>JSON-encoded attributes embedded in a block's opening comment</dt><dd><pre><header>Block_Attributes</header> = $("{" (!("}" __ "" "/"? "-->") .)* "}")</pre></dd><dt></dt><dd><pre><header>__</header> = [ \t\r\n]+</pre></dd></dl> diff --git a/docs/manifest.json b/docs/manifest.json index dfa85b7d12f34c..e7d2a88e11cc59 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -365,18 +365,6 @@ "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/designers-developers/designers/design-resources.md", "parent": "designers" }, - { - "title": "Glossary", - "slug": "glossary", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/designers-developers/glossary.md", - "parent": "designers-developers" - }, - { - "title": "Frequently Asked Questions", - "slug": "faq", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/designers-developers/faq.md", - "parent": "designers-developers" - }, { "title": "Contributors Guide", "slug": "contributors", @@ -384,105 +372,105 @@ "parent": null }, { - "title": "Coding Guidelines", - "slug": "coding-guidelines", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/coding-guidelines.md", - "parent": "contributors" - }, - { - "title": "Gutencopy Guidelines", - "slug": "copy-guide", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/copy-guide.md", + "title": "Principles", + "slug": "principles", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/principles.md", "parent": "contributors" }, { - "title": "Gutenberg Design Principles & Vision", + "title": "Design Principles & Vision", "slug": "design", "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/design.md", "parent": "contributors" }, { - "title": "The Gutenberg block grammar", - "slug": "grammar", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/grammar.md", - "parent": "contributors" + "title": "Blocks are the Interface", + "slug": "the-block", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/principles/the-block.md", + "parent": "design" }, { - "title": "History", - "slug": "history", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/history.md", - "parent": "contributors" + "title": "Reference", + "slug": "reference", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/reference.md", + "parent": "design" }, { - "title": "Outreach", - "slug": "outreach", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/outreach.md", + "title": "Developer Contributions", + "slug": "develop", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/develop.md", "parent": "contributors" }, { - "title": "Articles", - "slug": "articles", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/outreach/articles.md", - "parent": "outreach" + "title": "Coding Guidelines", + "slug": "coding-guidelines", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/coding-guidelines.md", + "parent": "develop" }, { - "title": "Meetups", - "slug": "meetups", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/outreach/meetups.md", - "parent": "outreach" + "title": "Block Grammar", + "slug": "grammar", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/grammar.md", + "parent": "develop" }, { - "title": "Resources", - "slug": "resources", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/outreach/resources.md", - "parent": "outreach" + "title": "Testing Overview", + "slug": "testing-overview", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/testing-overview.md", + "parent": "develop" }, { - "title": "Talks", - "slug": "talks", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/outreach/talks.md", - "parent": "outreach" + "title": "Scripts", + "slug": "scripts", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/scripts.md", + "parent": "develop" }, { - "title": "Principles", - "slug": "principles", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/principles.md", + "title": "Gutenberg Release Process", + "slug": "release", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/release.md", + "parent": "develop" + }, + { + "title": "Documentation Contributions", + "slug": "document", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/document.md", "parent": "contributors" }, { - "title": "Blocks are the Interface", - "slug": "the-block", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/principles/the-block.md", - "parent": "principles" + "title": "Copy Guidelines", + "slug": "copy-guide", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/copy-guide.md", + "parent": "document" }, { - "title": "Reference", - "slug": "reference", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/reference.md", + "title": "History", + "slug": "history", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/history.md", "parent": "contributors" }, { - "title": "Gutenberg Release Process", - "slug": "release", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/release.md", + "title": "Glossary", + "slug": "glossary", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/designers-developers/glossary.md", "parent": "contributors" }, { - "title": "Repository Management", - "slug": "repository-management", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/repository-management.md", + "title": "Frequently Asked Questions", + "slug": "faq", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/designers-developers/faq.md", "parent": "contributors" }, { - "title": "Scripts", - "slug": "scripts", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/scripts.md", + "title": "Repository Management", + "slug": "repository-management", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/repository-management.md", "parent": "contributors" }, { - "title": "Testing Overview", - "slug": "testing-overview", - "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/testing-overview.md", + "title": "Outreach", + "slug": "outreach", + "markdown_source": "https://github.com/raw/WordPress/gutenberg/master/docs/contributors/outreach.md", "parent": "contributors" }, { diff --git a/docs/toc.json b/docs/toc.json index ceb639a213cf94..cdb3fa096507b6 100644 --- a/docs/toc.json +++ b/docs/toc.json @@ -71,29 +71,28 @@ {"docs/designers-developers/designers/block-design.md": []}, {"docs/designers-developers/designers/design-patterns.md": []}, {"docs/designers-developers/designers/design-resources.md": []} - ]}, - {"docs/designers-developers/glossary.md": []}, - {"docs/designers-developers/faq.md": []} + ]} ]}, {"docs/contributors/readme.md": [ - {"docs/contributors/coding-guidelines.md": []}, - {"docs/contributors/copy-guide.md": []}, - {"docs/contributors/design.md": []}, - {"docs/contributors/grammar.md": []}, - {"docs/contributors/history.md": []}, - {"docs/contributors/outreach.md": [ - {"docs/contributors/outreach/articles.md": []}, - {"docs/contributors/outreach/meetups.md": []}, - {"docs/contributors/outreach/resources.md": []}, - {"docs/contributors/outreach/talks.md": []} + {"docs/contributors/principles.md": []}, + {"docs/contributors/design.md": [ + {"docs/contributors/principles/the-block.md": []}, + {"docs/contributors/reference.md": []} ]}, - {"docs/contributors/principles.md": [ - {"docs/contributors/principles/the-block.md": []} + {"docs/contributors/develop.md": [ + {"docs/contributors/coding-guidelines.md": []}, + {"docs/contributors/grammar.md": []}, + {"docs/contributors/testing-overview.md": []}, + {"docs/contributors/scripts.md": []}, + {"docs/contributors/release.md": []} ]}, - {"docs/contributors/reference.md": []}, - {"docs/contributors/release.md": []}, + {"docs/contributors/document.md": [ + {"docs/contributors/copy-guide.md": []} + ]}, + {"docs/contributors/history.md": []}, + {"docs/designers-developers/glossary.md": []}, + {"docs/designers-developers/faq.md": []}, {"docs/contributors/repository-management.md": []}, - {"docs/contributors/scripts.md": []}, - {"docs/contributors/testing-overview.md": []} + {"docs/contributors/outreach.md": []} ]} ] From 0259f7b2aec9ab66f3a040d08a5aeeb5c65e5756 Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Wed, 23 Jan 2019 15:21:16 -0500 Subject: [PATCH 48/56] is-shallow-equal: Use ES5 ruleset from eslint-plugin module (#13428) --- packages/is-shallow-equal/.eslintrc.json | 6 ++++-- packages/is-shallow-equal/CHANGELOG.md | 4 ++++ packages/is-shallow-equal/benchmark/.eslintrc.json | 4 ++++ packages/is-shallow-equal/test/.eslintrc.json | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 packages/is-shallow-equal/benchmark/.eslintrc.json create mode 100644 packages/is-shallow-equal/test/.eslintrc.json diff --git a/packages/is-shallow-equal/.eslintrc.json b/packages/is-shallow-equal/.eslintrc.json index 118dc091c3c8a3..3ab5b55d74cc09 100644 --- a/packages/is-shallow-equal/.eslintrc.json +++ b/packages/is-shallow-equal/.eslintrc.json @@ -1,5 +1,7 @@ { - "rules": { - "no-var": 0 + "root": true, + "extends": "plugin:@wordpress/eslint-plugin/es5", + "env": { + "node": true } } diff --git a/packages/is-shallow-equal/CHANGELOG.md b/packages/is-shallow-equal/CHANGELOG.md index cc266ecb20c859..876fcc4044e97e 100644 --- a/packages/is-shallow-equal/CHANGELOG.md +++ b/packages/is-shallow-equal/CHANGELOG.md @@ -4,6 +4,10 @@ - Type-specific variants are now exposed from the module root. In a WordPress context, this has the effect of making them available as `wp.isShallowEqual.isShallowEqualObjects` and `wp.isShallowEqual.isShallowEqualArrays`. +### Internal + +- Development source code linting extends the `@wordpress/eslint-plugin/es5` ruleset. + ## 1.1.0 (2018-07-12) ### New Feature diff --git a/packages/is-shallow-equal/benchmark/.eslintrc.json b/packages/is-shallow-equal/benchmark/.eslintrc.json new file mode 100644 index 00000000000000..93ba810c785626 --- /dev/null +++ b/packages/is-shallow-equal/benchmark/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": "../../../.eslintrc.js" +} diff --git a/packages/is-shallow-equal/test/.eslintrc.json b/packages/is-shallow-equal/test/.eslintrc.json new file mode 100644 index 00000000000000..93ba810c785626 --- /dev/null +++ b/packages/is-shallow-equal/test/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": "../../../.eslintrc.js" +} From 9a35324f1bd06efb6961ee347c9cb48b94b6b313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= <soerenwrede@gmail.com> Date: Thu, 24 Jan 2019 13:49:09 +0100 Subject: [PATCH 49/56] Fix: Categories block: add custom classes only to wrapper (#13439) * add wp-block-categories as prefix * render class names only on the block wrapper * review changes --- packages/block-library/src/categories/edit.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/categories/edit.js b/packages/block-library/src/categories/edit.js index b67eb0982e0bf2..5341ad6ff51682 100644 --- a/packages/block-library/src/categories/edit.js +++ b/packages/block-library/src/categories/edit.js @@ -57,8 +57,7 @@ class CategoriesEdit extends Component { } getCategoryListClassName( level ) { - const { className } = this.props; - return `${ className }__list ${ className }__list-level-${ level }`; + return `wp-block-categories__list wp-block-categories__list-level-${ level }`; } renderCategoryName( category ) { @@ -89,7 +88,7 @@ class CategoriesEdit extends Component { <li key={ category.id }> <a href={ category.link } target="_blank">{ this.renderCategoryName( category ) }</a> { showPostCounts && - <span className={ `${ this.props.className }__post-count` }> + <span className="wp-block-categories__post-count"> { ' ' }({ category.count }) </span> } @@ -107,7 +106,7 @@ class CategoriesEdit extends Component { } renderCategoryDropdown() { - const { showHierarchy, instanceId, className } = this.props; + const { showHierarchy, instanceId } = this.props; const parentId = showHierarchy ? 0 : null; const categories = this.getCategories( parentId ); const selectId = `blocks-category-select-${ instanceId }`; @@ -116,7 +115,7 @@ class CategoriesEdit extends Component { <label htmlFor={ selectId } className="screen-reader-text"> { __( 'Categories' ) } </label> - <select id={ selectId } className={ `${ className }__dropdown` }> + <select id={ selectId } className="wp-block-categories__dropdown"> { categories.map( ( category ) => this.renderCategoryDropdownItem( category, 0 ) ) } </select> </Fragment> From 884cabf1af84aa3cc0e07c7b949efeb3daa085ab Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Thu, 24 Jan 2019 08:43:15 -0500 Subject: [PATCH 50/56] Plugin: Deprecate gutenberg_remove_wpcom_markdown_support (#13473) --- .../developers/backward-compatibility/deprecations.md | 1 + lib/plugin-compat.php | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 85e82f25549c67..b6f49917371be4 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -21,6 +21,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `gutenberg_register_post_prepare_functions` has been removed. - The PHP function `gutenberg_silence_rest_errors` has been removed. - The PHP function `gutenberg_filter_post_type_labels` has been removed. +- The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/lib/plugin-compat.php b/lib/plugin-compat.php index 963535624de4c3..74f6dbb2cb0c89 100644 --- a/lib/plugin-compat.php +++ b/lib/plugin-compat.php @@ -21,14 +21,13 @@ * plugins Jetpack, JP-Markdown, and WP Editor.MD * * @since 1.3.0 + * @deprecated 5.0.0 * * @param array $post Post object which contains content to check for block. * @return array $post Post object. */ function gutenberg_remove_wpcom_markdown_support( $post ) { - if ( class_exists( 'WPCom_Markdown' ) && has_blocks( $post['post_content'] ) ) { - WPCom_Markdown::get_instance()->unload_markdown_for_posts(); - } + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $post; } -add_filter( 'wp_insert_post_data', 'gutenberg_remove_wpcom_markdown_support', 9 ); From eab7642a1da9d3e699aeefdee3e467f5c5949302 Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Thu, 24 Jan 2019 09:43:57 -0500 Subject: [PATCH 51/56] Plugin: Avoid calling deprecated gutenberg_silence_rest_errors (#13446) --- gutenberg.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index 655e883859fda6..29259acfadc277 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -187,10 +187,6 @@ function gutenberg_pre_init() { require_once dirname( __FILE__ ) . '/lib/load.php'; - if ( function_exists( 'gutenberg_silence_rest_errors' ) ) { - gutenberg_silence_rest_errors(); - } - add_filter( 'replace_editor', 'gutenberg_init', 10, 2 ); } From 6f54a83f613563d253fcde75adde75c394e0b58c Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Thu, 24 Jan 2019 09:44:28 -0500 Subject: [PATCH 52/56] Plugin: Deprecate gutenberg_bulk_post_updated_messages (#13472) --- .../backward-compatibility/deprecations.md | 1 + lib/register.php | 21 ++++--------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index b6f49917371be4..d90cbfec03877b 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -22,6 +22,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `gutenberg_silence_rest_errors` has been removed. - The PHP function `gutenberg_filter_post_type_labels` has been removed. - The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed. +- The PHP function `gutenberg_bulk_post_updated_messages` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/lib/register.php b/lib/register.php index b86df4fd7a37f0..3dc7264a9dfb0e 100644 --- a/lib/register.php +++ b/lib/register.php @@ -538,31 +538,18 @@ function gutenberg_register_post_types() { * Apply the correct labels for Reusable Blocks in the bulk action updated messages. * * @since 4.3.0 + * @deprecated 5.0.0 * - * @param array $messages Arrays of messages, each keyed by the corresponding post type. - * @param array $bulk_counts Array of item counts for each message, used to build internationalized strings. + * @param array $messages Arrays of messages, each keyed by the corresponding post type. * * @return array */ -function gutenberg_bulk_post_updated_messages( $messages, $bulk_counts ) { - $messages['wp_block'] = array( - // translators: Number of blocks updated. - 'updated' => _n( '%s block updated.', '%s blocks updated.', $bulk_counts['updated'], 'gutenberg' ), - // translators: Blocks not updated because they're locked. - 'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 block not updated, somebody is editing it.', 'gutenberg' ) : _n( '%s block not updated, somebody is editing it.', '%s blocks not updated, somebody is editing them.', $bulk_counts['locked'], 'gutenberg' ), - // translators: Number of blocks deleted. - 'deleted' => _n( '%s block permanently deleted.', '%s blocks permanently deleted.', $bulk_counts['deleted'], 'gutenberg' ), - // translators: Number of blocks trashed. - 'trashed' => _n( '%s block moved to the Trash.', '%s blocks moved to the Trash.', $bulk_counts['trashed'], 'gutenberg' ), - // translators: Number of blocks untrashed. - 'untrashed' => _n( '%s block restored from the Trash.', '%s blocks restored from the Trash.', $bulk_counts['untrashed'], 'gutenberg' ), - ); +function gutenberg_bulk_post_updated_messages( $messages ) { + _deprecated_function( __FUNCTION__, '5.0.0' ); return $messages; } -add_filter( 'bulk_post_updated_messages', 'gutenberg_bulk_post_updated_messages', 10, 2 ); - /** * Injects a hidden input in the edit form to propagate the information that classic editor is selected. * From 4d8fd5d6539b74cbffa9b2fd5e5f0683ac15db3e Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Thu, 24 Jan 2019 10:01:56 -0500 Subject: [PATCH 53/56] Plugin: Deprecate gutenberg_kses_allowedtags (#13460) --- .../developers/backward-compatibility/deprecations.md | 1 + gutenberg.php | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index d90cbfec03877b..5e7d0d7555be4b 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -23,6 +23,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `gutenberg_filter_post_type_labels` has been removed. - The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed. - The PHP function `gutenberg_bulk_post_updated_messages` has been removed. +- The PHP function `gutenberg_kses_allowedtags` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/gutenberg.php b/gutenberg.php index 29259acfadc277..990418ebf74a87 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -527,19 +527,17 @@ function gutenberg_add_admin_body_class( $classes ) { * Adds attributes to kses allowed tags that aren't in the default list * and that Gutenberg needs to save blocks such as the Gallery block. * + * @deprecated 5.0.0 + * * @param array $tags Allowed HTML. * @return array (Maybe) modified allowed HTML. */ function gutenberg_kses_allowedtags( $tags ) { - if ( isset( $tags['img'] ) ) { - $tags['img']['data-link'] = true; - $tags['img']['data-id'] = true; - } + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $tags; } -add_filter( 'wp_kses_allowed_html', 'gutenberg_kses_allowedtags', 10, 2 ); - /** * Adds the wp-embed-responsive class to the body tag if the theme has opted in to * Gutenberg responsive embeds. From c153cc46f94a36b774ea21d88f05a53716d03922 Mon Sep 17 00:00:00 2001 From: Andrea Fercia <a.fercia@gmail.com> Date: Thu, 24 Jan 2019 16:16:49 +0100 Subject: [PATCH 54/56] Add speak messages to the feature toggle component. (#13385) * Add speak messages to the feature toggle component. * Use plain props. --- .../components/header/feature-toggle/index.js | 21 ++++++++++++++++--- .../components/header/writing-menu/index.js | 15 ++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/edit-post/src/components/header/feature-toggle/index.js b/packages/edit-post/src/components/header/feature-toggle/index.js index 3b811e653fac41..c2de21f3ba713e 100644 --- a/packages/edit-post/src/components/header/feature-toggle/index.js +++ b/packages/edit-post/src/components/header/feature-toggle/index.js @@ -1,16 +1,30 @@ +/** + * External dependencies + */ +import { flow } from 'lodash'; + /** * WordPress Dependencies */ import { withSelect, withDispatch } from '@wordpress/data'; import { compose } from '@wordpress/compose'; -import { MenuItem } from '@wordpress/components'; +import { MenuItem, withSpokenMessages } from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; + +function FeatureToggle( { onToggle, isActive, label, info, messageActivated, messageDeactivated, speak } ) { + const speakMessage = () => { + if ( isActive ) { + speak( messageDeactivated || __( 'Feature deactivated' ) ); + } else { + speak( messageActivated || __( 'Feature activated' ) ); + } + }; -function FeatureToggle( { onToggle, isActive, label, info } ) { return ( <MenuItem icon={ isActive && 'yes' } isSelected={ isActive } - onClick={ onToggle } + onClick={ flow( onToggle, speakMessage ) } role="menuitemcheckbox" label={ label } info={ info } @@ -30,4 +44,5 @@ export default compose( [ ownProps.onToggle(); }, } ) ), + withSpokenMessages, ] )( FeatureToggle ); diff --git a/packages/edit-post/src/components/header/writing-menu/index.js b/packages/edit-post/src/components/header/writing-menu/index.js index e7b9c3dc791ade..6a3b6f62c44828 100644 --- a/packages/edit-post/src/components/header/writing-menu/index.js +++ b/packages/edit-post/src/components/header/writing-menu/index.js @@ -19,17 +19,26 @@ function WritingMenu( { onClose } ) { feature="fixedToolbar" label={ __( 'Top Toolbar' ) } info={ __( 'Access all block and document tools in a single place' ) } - onToggle={ onClose } /> + onToggle={ onClose } + messageActivated={ __( 'Top toolbar activated' ) } + messageDeactivated={ __( 'Top toolbar deactivated' ) } + /> <FeatureToggle feature="focusMode" label={ __( 'Spotlight Mode' ) } info={ __( 'Focus on one block at a time' ) } - onToggle={ onClose } /> + onToggle={ onClose } + messageActivated={ __( 'Spotlight mode activated' ) } + messageDeactivated={ __( 'Spotlight mode deactivated' ) } + /> <FeatureToggle feature="fullscreenMode" label={ __( 'Fullscreen Mode' ) } info={ __( 'Work without distraction' ) } - onToggle={ onClose } /> + onToggle={ onClose } + messageActivated={ __( 'Fullscreen mode activated' ) } + messageDeactivated={ __( 'Fullscreen mode deactivated' ) } + /> </MenuGroup> ); } From ff9961bd69c34c0caf488276b79c163bc63f94ff Mon Sep 17 00:00:00 2001 From: Andrew Duthie <andrew@andrewduthie.com> Date: Thu, 24 Jan 2019 10:32:47 -0500 Subject: [PATCH 55/56] Plugin: Deprecate gutenberg_add_responsive_body_class (#13461) --- .../developers/backward-compatibility/deprecations.md | 1 + gutenberg.php | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md index 5e7d0d7555be4b..fe1ca0b4a287e9 100644 --- a/docs/designers-developers/developers/backward-compatibility/deprecations.md +++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md @@ -24,6 +24,7 @@ The Gutenberg project's deprecation policy is intended to support backward compa - The PHP function `gutenberg_remove_wpcom_markdown_support` has been removed. - The PHP function `gutenberg_bulk_post_updated_messages` has been removed. - The PHP function `gutenberg_kses_allowedtags` has been removed. +- The PHP function `gutenberg_add_responsive_body_class` has been removed. ## 4.5.0 - `Dropdown.refresh()` has been deprecated as the contained `Popover` is now automatically refreshed. diff --git a/gutenberg.php b/gutenberg.php index 990418ebf74a87..7e019de8b8a252 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -543,15 +543,13 @@ function gutenberg_kses_allowedtags( $tags ) { * Gutenberg responsive embeds. * * @since 4.1.0 + * @deprecated 5.0.0 * * @param Array $classes Array of classes being added to the body tag. * @return Array The $classes array, with wp-embed-responsive appended. */ function gutenberg_add_responsive_body_class( $classes ) { - if ( current_theme_supports( 'responsive-embeds' ) ) { - $classes[] = 'wp-embed-responsive'; - } + _deprecated_function( __FUNCTION__, '5.0.0' ); + return $classes; } - -add_filter( 'body_class', 'gutenberg_add_responsive_body_class' ); From 996dab882bb9df6d1c5d3f6e0c9fd717dbd9ed8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= <grzegorz@gziolo.pl> Date: Thu, 24 Jan 2019 16:57:43 +0100 Subject: [PATCH 56/56] Save package-lock.json file changes (#13481) --- package-lock.json | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 307215cb6a5b25..d862eeb3aa823b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2427,6 +2427,7 @@ "@babel/runtime": "^7.0.0", "@wordpress/api-fetch": "file:packages/api-fetch", "@wordpress/data": "file:packages/data", + "@wordpress/deprecated": "file:packages/deprecated", "@wordpress/url": "file:packages/url", "equivalent-key-map": "^0.2.2", "lodash": "^4.17.10", @@ -2975,6 +2976,7 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2986,6 +2988,7 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, + "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -8048,7 +8051,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -8069,12 +8073,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -8089,17 +8095,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -8216,7 +8225,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -8228,6 +8238,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -8242,6 +8253,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -8249,12 +8261,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -8273,6 +8287,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -8353,7 +8368,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -8365,6 +8381,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -8450,7 +8467,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -8486,6 +8504,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -8505,6 +8524,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -8548,12 +8568,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -12657,7 +12679,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true + "dev": true, + "optional": true }, "longest-streak": { "version": "2.0.2",