Skip to content

Commit

Permalink
Packages: Replace is-plain-obj with is-plain-object (#43511)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla authored Aug 23, 2022
1 parent 69d2e59 commit 19c8420
Show file tree
Hide file tree
Showing 21 changed files with 103 additions and 38 deletions.
71 changes: 56 additions & 15 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

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

## 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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 native functionality ([#43511](https://github.com/WordPress/gutenberg/pull/43511)).

## 1.2.0 (2022-04-21)

### Enhancement
Expand Down
8 changes: 2 additions & 6 deletions packages/prettier-config/test/index.js
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 19c8420

Please sign in to comment.