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

Packages: Replace is-plain-obj with is-plain-object #43511

Merged
merged 7 commits into from Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 38 additions & 10 deletions package-lock.json

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

4 changes: 4 additions & 0 deletions packages/blocks/CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 11.14.0 (2022-08-10)

## 11.13.0 (2022-07-27)
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/package.json
Expand Up @@ -44,7 +44,7 @@
"change-case": "^4.1.2",
"colord": "^2.7.0",
"hpq": "^1.3.0",
"is-plain-obj": "^4.1.0",
"is-plain-object": "^5.0.0",
"lodash": "^4.17.21",
"memize": "^1.1.0",
"rememo": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/store/actions.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import isPlainObject from 'is-plain-obj';
import { isPlainObject } from 'is-plain-object';
import { castArray, omit, pick, some } from 'lodash';

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/data/CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@

– Add TypeScript types to the built package (via "types": "build-types" in the package.json)

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 6.15.0 (2022-08-10)

## 6.14.0 (2022-07-27)
Expand Down
2 changes: 1 addition & 1 deletion packages/data/package.json
Expand Up @@ -36,7 +36,7 @@
"@wordpress/priority-queue": "file:../priority-queue",
"@wordpress/redux-routine": "file:../redux-routine",
"equivalent-key-map": "^0.2.2",
"is-plain-obj": "^4.1.0",
"is-plain-object": "^5.0.0",
"is-promise": "^4.0.0",
"lodash": "^4.17.21",
"redux": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/data/src/plugins/persistence/index.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import isPlainObject from 'is-plain-obj';
import { isPlainObject } from 'is-plain-object';
import { merge } from 'lodash';

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/element/CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 4.13.0 (2022-08-10)

## 4.12.0 (2022-07-27)
Expand Down
2 changes: 1 addition & 1 deletion packages/element/package.json
Expand Up @@ -33,7 +33,7 @@
"@types/react-dom": "^17.0.11",
"@wordpress/escape-html": "file:../escape-html",
"change-case": "^4.1.2",
"is-plain-obj": "^4.1.0",
"is-plain-object": "^5.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/element/src/serialize.js
Expand Up @@ -28,7 +28,7 @@
/**
* External dependencies
*/
import isPlainObject from 'is-plain-obj';
import { isPlainObject } from 'is-plain-object';
import { paramCase as kebabCase } from 'change-case';

/**
Expand Down
4 changes: 4 additions & 0 deletions packages/jest-preset-default/CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@

- Increase the minimum Node.js version to 14 ([#43141](https://github.com/WordPress/gutenberg/pull/43141)).

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 8.5.2 (2022-08-17)

### Bug Fix
Expand Down
1 change: 0 additions & 1 deletion packages/jest-preset-default/jest-preset.js
Expand Up @@ -29,5 +29,4 @@ module.exports = {
transform: {
'\\.[jt]sx?$': require.resolve( 'babel-jest' ),
},
transformIgnorePatterns: [ 'node_modules/(?:(?!is-plain-obj/).)*$' ],
};
4 changes: 4 additions & 0 deletions packages/npm-package-json-lint-config/CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).
tyxla marked this conversation as resolved.
Show resolved Hide resolved

## 4.0.0 (2021-01-21)

### Breaking Change
Expand Down
11 changes: 4 additions & 7 deletions packages/npm-package-json-lint-config/test/index.test.js
@@ -1,19 +1,16 @@
/**
* External dependencies
*/
import isPlainObject from 'is-plain-obj';

/**
* Internal dependencies
*/
import config from '../';

describe( 'npm-package-json-lint config tests', () => {
it( 'should be an object', () => {
expect( isPlainObject( config ) ).toBeTruthy();
expect( config ).not.toBeNull();
expect( typeof config ).toBe( 'object' );
} );

it( 'should have rules property as an object', () => {
expect( isPlainObject( config.rules ) ).toBeTruthy();
expect( config.rules ).not.toBeNull();
expect( typeof config.rules ).toBe( 'object' );
} );
} );
4 changes: 4 additions & 0 deletions packages/prettier-config/CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@

- Increase the minimum Node.js version to 14 ([#43141](https://github.com/WordPress/gutenberg/pull/43141)).

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).
tyxla marked this conversation as resolved.
Show resolved Hide resolved

## 1.2.0 (2022-04-21)

### Enhancement
Expand Down
8 changes: 2 additions & 6 deletions packages/prettier-config/test/index.js
@@ -1,15 +1,11 @@
/**
* External dependencies
*/
import isPlainObject from 'is-plain-obj';

/**
* Internal dependencies
*/
import config from '../lib/';

describe( 'prettier config tests', () => {
it( 'should be an object', () => {
expect( isPlainObject( config ) ).toBeTruthy();
expect( config ).not.toBeNull();
expect( typeof config ).toBe( 'object' );
} );
} );
4 changes: 4 additions & 0 deletions packages/redux-routine/CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 4.15.0 (2022-08-10)

## 4.14.0 (2022-07-27)
Expand Down
2 changes: 1 addition & 1 deletion packages/redux-routine/package.json
Expand Up @@ -30,7 +30,7 @@
"sideEffects": false,
"dependencies": {
"@babel/runtime": "^7.16.0",
"is-plain-obj": "^4.1.0",
"is-plain-object": "^5.0.0",
"is-promise": "^4.0.0",
"lodash": "^4.17.21",
"rungen": "^0.3.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/redux-routine/src/is-action.js
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import isPlainObject from 'is-plain-obj';
import { isPlainObject } from 'is-plain-object';

/* eslint-disable jsdoc/valid-types */
/**
Expand Down
4 changes: 4 additions & 0 deletions packages/scripts/CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@
- Increase the minimum Node.js version to 14 and minimum npm version to 6.14.4 ([#43141](https://github.com/WordPress/gutenberg/pull/43141)).
- The bundled `@wordpress/eslint-plugin` package got updated to the new major version and the default linting for Jest unit tests is now handled in the default config in this package ([#43272](https://github.com/WordPress/gutenberg/pull/43272)).

### Bug Fix

- Packages: Replace `is-plain-obj` with `is-plain-object` ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 23.7.2 (2022-08-17)

### Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion test/native/jest.config.js
Expand Up @@ -65,7 +65,7 @@ module.exports = {
// See: https://github.com/wordpress-mobile/gutenberg-mobile/pull/257#discussion_r234978268
// There is no overloading in jest so we need to rewrite the config from react-native-jest-preset:
// https://github.com/facebook/react-native/blob/HEAD/jest-preset.json#L20
'node_modules/(?!(simple-html-tokenizer|is-plain-obj|(jest-)?react-native|@react-native|react-clone-referenced-element|@react-navigation))',
'node_modules/(?!(simple-html-tokenizer|(jest-)?react-native|@react-native|react-clone-referenced-element|@react-navigation))',
],
snapshotSerializers: [ '@emotion/jest/serializer' ],
reporters: [ 'default', 'jest-junit' ],
Expand Down