Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Monorepo] Move dependencies to root package.json and change yarn to npm #18531

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2d06157
move dependencies to root package.json and change yarn to npm
dratwas Nov 14, 2019
be79473
fix lint issues
dratwas Nov 14, 2019
27f055b
use specified version instead of ranges in root package.json
dratwas Nov 27, 2019
ce0fdd7
set imported packages as private
dratwas Nov 27, 2019
8a8cc60
First pass cleaning unused files and symlinks
Tug Jan 17, 2020
eedbb24
Fix lint errors
Tug Jan 17, 2020
a176791
Make travis CI run on feat/import-gutenberg-mobile-no-squash
Tug Jan 17, 2020
eb4c54a
Update our react-native packages references in the codebase
Tug Jan 21, 2020
a793d72
Fix native unit tests npm run test-unit:native et npm run native test
Tug Jan 21, 2020
5b05cd6
Remove unnecessary changes in root package.json
Tug Jan 21, 2020
3593d02
Fix npm run lint-types
Tug Jan 21, 2020
e516d95
Only load required typescript definitions for npm run lint to pass, e…
Tug Jan 21, 2020
51b9775
Exclude bundle and native code from eslint
Tug Jan 21, 2020
20de6c6
Exclude react-native packages completely from linter checks, will nee…
Tug Jan 21, 2020
da4f747
Move local react-native package dependencies to the right section
Tug Jan 21, 2020
90f29cf
Fix npm run build: Do not build react-native packages from the main p…
Tug Jan 22, 2020
7a7281e
Fix main build
Tug Jan 22, 2020
2e7794a
Fix npm run test-unit: exclude react native packages
Tug Jan 22, 2020
4439e25
Remove all dependencies that are needed for native e2e testing
Tug Jan 23, 2020
306be8d
Add missing dependency for ci
Tug Jan 23, 2020
759894b
Remove react-native-aztec/example package files
Tug Jan 24, 2020
9a14d97
Revert changes on react-native-aztec example/editor
Tug Jan 28, 2020
90d23ee
Fix package.json errors
Tug Feb 5, 2020
9b76079
Bring back equivalent-key-map to please the CI
Tug Feb 5, 2020
79e5464
Fix a bridge import
Tug Feb 6, 2020
aa94591
package-lock update
Tug Feb 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build-module
node_modules
packages/block-serialization-spec-parser/parser.js
packages/e2e-tests/plugins
packages/react-native-*
Tug marked this conversation as resolved.
Show resolved Hide resolved
playground/dist
vendor
wordpress
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ branches:
- master
- rnmobile/master
- rnmobile/releases
- feat/import-gutenberg-mobile-no-squash
- /wp\/.*/

env:
Expand Down
1 change: 1 addition & 0 deletions bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ if ( files.length ) {
`**/benchmark/**`,
`**/{__mocks__,__tests__,test}/**`,
`**/{storybook,stories}/**`,
`**/react-native-*/**`,
],
onlyFiles: true,
} );
Expand Down
18 changes: 18 additions & 0 deletions docs/manifest-devhub.json
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,24 @@
"markdown_source": "../packages/project-management-automation/README.md",
"parent": "packages"
},
{
"title": "@wordpress/react-native-aztec",
"slug": "packages-react-native-aztec",
"markdown_source": "../packages/react-native-aztec/README.md",
"parent": "packages"
},
{
"title": "@wordpress/react-native-bridge",
"slug": "packages-react-native-bridge",
"markdown_source": "../packages/react-native-bridge/README.md",
"parent": "packages"
},
{
"title": "@wordpress/react-native-editor",
"slug": "packages-react-native-editor",
"markdown_source": "../packages/react-native-editor/README.md",
"parent": "packages"
},
{
"title": "@wordpress/redux-routine",
"slug": "packages-redux-routine",
Expand Down
33,374 changes: 18,592 additions & 14,782 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
"@wordpress/nux": "file:packages/nux",
"@wordpress/plugins": "file:packages/plugins",
"@wordpress/priority-queue": "file:packages/priority-queue",
"@wordpress/react-native-aztec": "file:packages/react-native-aztec",
"@wordpress/react-native-bridge": "file:packages/react-native-bridge",
"@wordpress/react-native-editor": "file:packages/react-native-editor",
"@wordpress/redux-routine": "file:packages/redux-routine",
"@wordpress/rich-text": "file:packages/rich-text",
"@wordpress/server-side-render": "file:packages/server-side-render",
Expand Down Expand Up @@ -103,6 +106,7 @@
"@wordpress/npm-package-json-lint-config": "file:packages/npm-package-json-lint-config",
"@wordpress/postcss-themes": "file:packages/postcss-themes",
"@wordpress/scripts": "file:packages/scripts",
"babel-jest": "24.9.0",
"babel-loader": "8.0.6",
"babel-plugin-emotion": "10.0.23",
"babel-plugin-inline-json-import": "0.3.2",
Expand All @@ -120,6 +124,7 @@
"cssnano": "4.1.10",
"deep-freeze": "0.0.1",
"enzyme": "3.9.0",
"equivalent-key-map": "0.2.2",
"eslint-plugin-eslint-comments": "3.1.2",
"eslint-plugin-import": "2.18.2",
"fast-glob": "2.2.7",
Expand All @@ -128,6 +133,7 @@
"husky": "3.0.5",
"inquirer": "6.3.1",
"is-equal-shallow": "0.1.3",
"jest": "24.9.0",
"jest-emotion": "10.0.17",
"jest-junit": "6.4.0",
"jest-serializer-enzyme": "1.0.0",
Expand All @@ -146,7 +152,7 @@
"progress": "2.0.3",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "0.60.0",
"react-native": "jtreanor/react-native#v0.60.0-patched",
Tug marked this conversation as resolved.
Show resolved Hide resolved
"react-test-renderer": "16.9.0",
"rimraf": "2.6.2",
"rtlcss": "2.4.0",
Expand Down Expand Up @@ -192,6 +198,7 @@
"lint-css:fix": "npm run lint-css -- --fix",
"lint-types": "tsc",
"lint-md": "wp-scripts lint-md",
"native": "npm run --prefix packages/react-native-editor",
"package-plugin": "./bin/build-plugin-zip.sh",
"pot-to-php": "./bin/pot-to-php.js",
"publish:check": "lerna updated",
Expand All @@ -209,7 +216,7 @@
"test-unit-php": "wp-scripts env test-php",
"test-unit-php-multisite": "cross-env WP_MULTISITE=1 wp-scripts env test-php",
"test-unit:native": "cd test/native/ && cross-env NODE_ENV=test jest --config ./jest.config.js",
"test-unit:native:debug": "cd test/native/ && node --inspect-brk ../../node_modules/.bin/jest --runInBand --verbose --config ./jest.config.js",
"test-unit:native:debug": "cd test/native/ && node --inspect ../../node_modules/.bin/jest --runInBand --config ./jest.config.js",
"prestorybook:build": "npm run build:packages",
"storybook:build": "build-storybook -c ./storybook -o ./playground/dist",
"prestorybook:dev": "npm run build:packages",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
*/
import React from 'react';
import { View } from 'react-native';
import {
subscribeMediaUpload,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -14,6 +11,9 @@ import {
Spinner,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import {
subscribeMediaUpload,
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
* External dependencies
*/
import { shallow } from 'enzyme';

/**
* WordPress dependencies
*/
import {
sendMediaUpload,
} from 'react-native-gutenberg-bridge';
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand All @@ -17,7 +21,7 @@ import {
MEDIA_UPLOAD_STATE_RESET,
} from '../';

jest.mock( 'react-native-gutenberg-bridge', () => {
jest.mock( '@wordpress/react-native-bridge', () => {
const callUploadCallback = ( payload ) => {
this.uploadCallBack( payload );
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
* External dependencies
*/
import React from 'react';
import {
getOtherMediaOptions,
requestMediaPicker,
mediaSources,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { Picker } from '@wordpress/components';
import {
getOtherMediaOptions,
requestMediaPicker,
mediaSources,
} from '@wordpress/react-native-bridge';

export const MEDIA_TYPE_IMAGE = 'image';
export const MEDIA_TYPE_VIDEO = 'video';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
*/
import { shallow } from 'enzyme';
import { TouchableWithoutFeedback } from 'react-native';

/**
* WordPress dependencies
*/
import {
requestMediaPicker,
mediaSources,
} from 'react-native-gutenberg-bridge';
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
8 changes: 4 additions & 4 deletions packages/block-library/src/gallery/gallery-image.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* External dependencies
*/
import { Image, StyleSheet, View, ScrollView, Text, TouchableWithoutFeedback } from 'react-native';
import {
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from 'react-native-gutenberg-bridge';
import { isEmpty } from 'lodash';

/**
Expand All @@ -17,6 +13,10 @@ import { __, sprintf } from '@wordpress/i18n';
import { Caption, MediaUploadProgress } from '@wordpress/block-editor';
import { isURL } from '@wordpress/url';
import { withPreferredColorScheme } from '@wordpress/compose';
import {
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
15 changes: 7 additions & 8 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
*/
import React from 'react';
import { View, ImageBackground, Text, TouchableWithoutFeedback, Dimensions } from 'react-native';
import {
requestMediaImport,
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
requestImageFullscreenPreview,
} from 'react-native-gutenberg-bridge';
import { isEmpty, map, get } from 'lodash';

/**
Expand All @@ -25,7 +18,6 @@ import {
ToolbarButton,
ToolbarGroup,
} from '@wordpress/components';

import {
BlockCaption,
MediaPlaceholder,
Expand All @@ -41,6 +33,13 @@ import { isURL } from '@wordpress/url';
import { doAction, hasAction } from '@wordpress/hooks';
import { compose, withPreferredColorScheme } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';
import {
requestMediaImport,
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
requestImageFullscreenPreview,
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
10 changes: 5 additions & 5 deletions packages/block-library/src/media-text/media-container.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
* External dependencies
*/
import { View, ImageBackground, Text, TouchableWithoutFeedback } from 'react-native';
import {
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -31,6 +26,11 @@ import { Component } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { isURL } from '@wordpress/url';
import { compose, withPreferredColorScheme } from '@wordpress/compose';
import {
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
14 changes: 5 additions & 9 deletions packages/block-library/src/video/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ import React from 'react';
import { View, TouchableWithoutFeedback, Text } from 'react-native';
import { isEmpty } from 'lodash';

/**
* Internal dependencies
*/
import {
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
*/
Expand All @@ -38,6 +29,11 @@ import {
import { __, sprintf } from '@wordpress/i18n';
import { isURL } from '@wordpress/url';
import { doAction, hasAction } from '@wordpress/hooks';
import {
mediaUploadSync,
requestImageFailedRetryDialog,
requestImageUploadCancelDialog,
} from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/components/layout/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { Platform, SafeAreaView, View } from 'react-native';
import SafeArea from 'react-native-safe-area';
import { sendNativeEditorDidLayout } from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -14,6 +13,7 @@ import { BottomSheetSettings, __experimentalPageTemplatePicker, __experimentalWi
import { compose, withPreferredColorScheme } from '@wordpress/compose';
import { HTMLTextInput, KeyboardAvoidingView, ReadableContentView } from '@wordpress/components';
import { AutosaveMonitor } from '@wordpress/editor';
import { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/editor.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import memize from 'memize';
import { size, map, without } from 'lodash';
import { subscribeSetFocusOnTitle } from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
Expand All @@ -14,6 +13,7 @@ import { parse, serialize } from '@wordpress/blocks';
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { SlotFillProvider } from '@wordpress/components';
import { subscribeSetFocusOnTitle } from '@wordpress/react-native-bridge';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/test/editor.native.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* External dependencies
*/
import RNReactNativeGutenbergBridge from 'react-native-gutenberg-bridge';
import { mount } from 'enzyme';
import { act } from 'react-dom/test-utils';

/**
* WordPress dependencies
*/
import { registerCoreBlocks } from '@wordpress/block-library';
import RNReactNativeGutenbergBridge from '@wordpress/react-native-bridge';
// Force register 'core/editor' store.
import { store } from '@wordpress/editor'; // eslint-disable-line no-unused-vars

Expand Down
18 changes: 7 additions & 11 deletions packages/editor/src/components/provider/index.native.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
/**
* External dependencies
*/
import RNReactNativeGutenbergBridge, {
subscribeParentGetHtml,
subscribeParentToggleHTMLMode,
subscribeUpdateHtml,
subscribeSetTitle,
subscribeMediaAppend,
} from 'react-native-gutenberg-bridge';

/**
* WordPress dependencies
*/
Expand All @@ -17,6 +6,13 @@ import { parse, serialize, getUnregisteredTypeHandlerName, createBlock } from '@
import { withDispatch, withSelect } from '@wordpress/data';
import { compose } from '@wordpress/compose';
import { doAction } from '@wordpress/hooks';
import RNReactNativeGutenbergBridge, {
subscribeParentGetHtml,
subscribeParentToggleHTMLMode,
subscribeUpdateHtml,
subscribeSetTitle,
subscribeMediaAppend,
} from '@wordpress/react-native-bridge';

const postTypeEntities = [
{ name: 'post', baseURL: '/wp/v2/posts' },
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/store/actions.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
* WordPress dependencies
*/
import RNReactNativeGutenbergBridge from 'react-native-gutenberg-bridge';
import RNReactNativeGutenbergBridge from '@wordpress/react-native-bridge';

export * from './actions.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-aztec/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'react-native-aztec'
rootProject.name = '@wordpress/react-native-aztec'
Tug marked this conversation as resolved.
Show resolved Hide resolved

Loading