Skip to content

Commit

Permalink
Reexport createSelector from data package (#60370)
Browse files Browse the repository at this point in the history
Co-authored-by: jsnajdr <[email protected]>
Co-authored-by: ellatrix <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2024
1 parent 9d0dc01 commit 570be6f
Show file tree
Hide file tree
Showing 35 changed files with 79 additions and 132 deletions.
52 changes: 14 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/annotations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@wordpress/hooks": "file:../hooks",
"@wordpress/i18n": "file:../i18n",
"@wordpress/rich-text": "file:../rich-text",
"rememo": "^4.0.2",
"uuid": "^9.0.1"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/annotations/src/store/selectors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
* WordPress dependencies
*/
import createSelector from 'rememo';
import { createSelector } from '@wordpress/data';

/**
* Shared reference to an empty array for cases where it is important to avoid
Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"postcss-urlrebase": "^1.0.0",
"react-autosize-textarea": "^7.1.0",
"react-easy-crop": "^4.5.1",
"rememo": "^4.0.2",
"remove-accents": "^0.5.0"
},
"peerDependencies": {
Expand Down
7 changes: 1 addition & 6 deletions packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* External dependencies
*/
import createSelector from 'rememo';

/**
* WordPress dependencies
*/
import { createRegistrySelector } from '@wordpress/data';
import { createSelector, createRegistrySelector } from '@wordpress/data';

/**
* Internal dependencies
Expand Down
7 changes: 1 addition & 6 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/**
* External dependencies
*/
import createSelector from 'rememo';

/**
* WordPress dependencies
*/
Expand All @@ -21,7 +16,7 @@ import { applyFilters } from '@wordpress/hooks';
import { symbol } from '@wordpress/icons';
import { create, remove, toHTMLString } from '@wordpress/rich-text';
import deprecated from '@wordpress/deprecated';
import { createRegistrySelector } from '@wordpress/data';
import { createSelector, createRegistrySelector } from '@wordpress/data';

/**
* Internal dependencies
Expand Down
1 change: 0 additions & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"is-plain-object": "^5.0.0",
"memize": "^2.1.0",
"react-is": "^18.2.0",
"rememo": "^4.0.2",
"remove-accents": "^0.5.0",
"showdown": "^1.9.1",
"simple-html-tokenizer": "^0.5.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/src/store/private-selectors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
* WordPress dependencies
*/
import createSelector from 'rememo';
import { createSelector } from '@wordpress/data';

/**
* Internal dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/store/selectors.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* External dependencies
*/
import createSelector from 'rememo';
import removeAccents from 'remove-accents';

/**
* WordPress dependencies
*/
import { pipe } from '@wordpress/compose';
import { createSelector } from '@wordpress/data';

/**
* Internal dependencies
Expand Down
3 changes: 1 addition & 2 deletions packages/commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
"@wordpress/keyboard-shortcuts": "file:../keyboard-shortcuts",
"@wordpress/private-apis": "file:../private-apis",
"classnames": "^2.3.1",
"cmdk": "^0.2.0",
"rememo": "^4.0.2"
"cmdk": "^0.2.0"
},
"peerDependencies": {
"react": "^18.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/commands/src/store/selectors.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
* WordPress dependencies
*/
import createSelector from 'rememo';
import { createSelector } from '@wordpress/data';

/**
* Returns the registered static commands.
Expand Down
1 change: 0 additions & 1 deletion packages/core-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"equivalent-key-map": "^0.2.2",
"fast-deep-equal": "^3.1.3",
"memize": "^2.1.0",
"rememo": "^4.0.2",
"uuid": "^9.0.1"
},
"peerDependencies": {
Expand Down
7 changes: 1 addition & 6 deletions packages/core-data/src/private-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* External dependencies
*/
import createSelector from 'rememo';

/**
* WordPress dependencies
*/
import { createRegistrySelector } from '@wordpress/data';
import { createSelector, createRegistrySelector } from '@wordpress/data';

/**
* Internal dependencies
Expand Down
6 changes: 5 additions & 1 deletion packages/core-data/src/queried-data/selectors.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/**
* External dependencies
*/
import createSelector from 'rememo';
import EquivalentKeyMap from 'equivalent-key-map';

/**
* WordPress dependencies
*/
import { createSelector } from '@wordpress/data';

/**
* Internal dependencies
*/
Expand Down
7 changes: 1 addition & 6 deletions packages/core-data/src/selectors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* External dependencies
*/
import createSelector from 'rememo';

/**
* WordPress dependencies
*/
import { createRegistrySelector } from '@wordpress/data';
import { createSelector, createRegistrySelector } from '@wordpress/data';
import { addQueryArgs } from '@wordpress/url';
import deprecated from '@wordpress/deprecated';

Expand Down
2 changes: 2 additions & 0 deletions packages/data/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Add new `createSelector` function for creating memoized store selectors ([#60370](https://github.com/WordPress/gutenberg/pull/60370)).

## 9.25.0 (2024-04-03)

## 9.24.0 (2024-03-21)
Expand Down
Loading

0 comments on commit 570be6f

Please sign in to comment.