Skip to content

Commit

Permalink
Fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur791004 committed Jan 17, 2025
1 parent bd6ee1c commit 1276e49
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 22 deletions.
11 changes: 10 additions & 1 deletion projects/js-packages/shared-extension-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,26 @@
"test-coverage": "pnpm run test --coverage"
},
"dependencies": {
"@automattic/color-studio": "4.0.0",
"@automattic/request-external-access": "1.0.0",
"@automattic/jetpack-analytics": "workspace:*",
"@automattic/jetpack-base-styles": "workspace:*",
"@automattic/jetpack-components": "workspace:*",
"@automattic/jetpack-connection": "workspace:*",
"@wordpress/api-fetch": "7.14.0",
"@wordpress/components": "29.0.0",
"@wordpress/compose": "7.14.0",
"@wordpress/data": "10.14.0",
"@wordpress/date": "5.14.0",
"@wordpress/element": "6.14.0",
"@wordpress/i18n": "5.14.0",
"@wordpress/icons": "10.14.0",
"@wordpress/keycodes": "4.14.0",
"@wordpress/plugins": "7.14.0",
"@wordpress/url": "4.14.0",
"lodash": "4.17.21"
"clsx": "2.1.1",
"lodash": "4.17.21",
"moment": "2.30.1"
},
"devDependencies": {
"@automattic/jetpack-webpack-config": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import {
NumberControl as BlockEditorNumberControl,
__experimentalNumberControl as ExperimentalNumberControl, // eslint-disable-line @wordpress/no-unsafe-wp-apis
TextControl,
} from '@wordpress/components';

/**
* This uses the publicly accessible or experimental NumberControl
* from the block editor where available, otherwise it falls back
* to a standard TextControl, limited to numbers.
* This uses the experimental NumberControl from the block
* editor where available, otherwise it falls back to a
* standard TextControl, limited to numbers.
*
* @param {any} props - the NumberControl component props
* @return {object} - NumberControl component
*/
const NumberControl =
BlockEditorNumberControl ||
ExperimentalNumberControl ||
function CustomNumberControl( props ) {
return <TextControl type="number" inputMode="numeric" { ...props } />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { Icon, external } from '@wordpress/icons';
import React, { useEffect } from 'react';
import mediaImage from '../../../../../images/media.svg';
import mediaImage from '../../../images/media.svg';
import GooglePhotosAccount from './google-photos-account';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import moment from 'moment';
import React, { useEffect, useState } from 'react';
import {
MediaLoadingPlaceholder,
getGooglePhotosPickerCachedSessionId,
MediaSource,
withMedia,
} from '@automattic/jetpack-shared-extension-utils';
import MediaLoadingPlaceholder from '../../media-browser/placeholder';
import { getGooglePhotosPickerCachedSessionId } from '../../media-service';
import { MediaSource } from '../../media-service/types';
import withMedia from '../with-media';
import GooglePhotosAuth from './google-photos-auth';
import GooglePhotosAuthUpgrade from './google-photos-auth-upgrade';
import GooglePhotosMedia from './google-photos-media';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ import { useRef, useCallback, useState, useEffect } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { sample } from 'lodash';
import React from 'react';
import {
SOURCE_PEXELS,
PEXELS_EXAMPLE_QUERIES,
MediaBrowser,
MediaSource,
getExternalMediaApiUrl,
withMedia,
} from '@automattic/jetpack-shared-extension-utils';
import { SOURCE_PEXELS, PEXELS_EXAMPLE_QUERIES } from '../constants';
import MediaBrowser from '../media-browser';
import { MediaSource } from '../media-service/types';
import { getExternalMediaApiUrl } from './api';
import withMedia from './with-media';

/**
* PexelsMedia component
Expand Down
File renamed without changes
12 changes: 12 additions & 0 deletions projects/js-packages/shared-extension-utils/src/public-path.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* exported __webpack_public_path__ */
/* global __webpack_public_path__ */

/**
* Dynamically set WebPack's publicPath so that split assets can be found.
* Unfortunately we can't set `publicPath: 'auto'` because WordPress.com Simple's JS concatenation breaks it (and other plugins that do JS concatenation probably would too).
* @see https://webpack.js.org/guides/public-path/#on-the-fly
*/
if ( typeof window === 'object' && window.Jetpack_Block_Assets_Base_Url ) {
// eslint-disable-next-line no-global-assign
__webpack_public_path__ = window.Jetpack_Block_Assets_Base_Url;
}
1 change: 0 additions & 1 deletion projects/plugins/jetpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@automattic/jetpack-script-data": "workspace:*",
"@automattic/jetpack-shared-extension-utils": "workspace:*",
"@automattic/popup-monitor": "1.0.2",
"@automattic/request-external-access": "1.0.0",
"@automattic/social-previews": "2.1.0-beta.8",
"@automattic/viewport": "1.0.0",
"@microsoft/fetch-event-source": "2.0.1",
Expand Down

0 comments on commit 1276e49

Please sign in to comment.