diff --git a/.changeset/gold-planets-pump.md b/.changeset/gold-planets-pump.md new file mode 100644 index 000000000..4a85d7abb --- /dev/null +++ b/.changeset/gold-planets-pump.md @@ -0,0 +1,8 @@ +--- +'slate-history': patch +'slate-hyperscript': patch +'slate-react': patch +'slate': patch +--- + +Upgrade `is-plain-object` to v5.0.0 diff --git a/packages/slate-history/package.json b/packages/slate-history/package.json index 185c55160..fc1a7099c 100644 --- a/packages/slate-history/package.json +++ b/packages/slate-history/package.json @@ -14,7 +14,7 @@ "dist/" ], "dependencies": { - "is-plain-object": "^3.0.0" + "is-plain-object": "^5.0.0" }, "devDependencies": { "@babel/runtime": "^7.7.4", diff --git a/packages/slate-history/src/history.ts b/packages/slate-history/src/history.ts index c16ce262d..b0bc9333e 100644 --- a/packages/slate-history/src/history.ts +++ b/packages/slate-history/src/history.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { Operation } from 'slate' /** diff --git a/packages/slate-hyperscript/package.json b/packages/slate-hyperscript/package.json index 33e03b0a3..234a3a703 100644 --- a/packages/slate-hyperscript/package.json +++ b/packages/slate-hyperscript/package.json @@ -14,7 +14,7 @@ "dist/" ], "dependencies": { - "is-plain-object": "^3.0.0" + "is-plain-object": "^5.0.0" }, "devDependencies": { "@babel/runtime": "^7.7.4", diff --git a/packages/slate-hyperscript/src/hyperscript.ts b/packages/slate-hyperscript/src/hyperscript.ts index a65092aa5..b460c89c3 100644 --- a/packages/slate-hyperscript/src/hyperscript.ts +++ b/packages/slate-hyperscript/src/hyperscript.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { Element } from 'slate' import { createAnchor, diff --git a/packages/slate-react/package.json b/packages/slate-react/package.json index 5c9c953a2..1be436937 100644 --- a/packages/slate-react/package.json +++ b/packages/slate-react/package.json @@ -18,7 +18,7 @@ "@types/lodash": "^4.14.149", "direction": "^1.0.3", "is-hotkey": "^0.1.6", - "is-plain-object": "^3.0.0", + "is-plain-object": "^5.0.0", "lodash": "^4.17.4", "scroll-into-view-if-needed": "^2.2.20", "tiny-invariant": "1.0.6" diff --git a/packages/slate/package.json b/packages/slate/package.json index e1dc11511..d0c00b9da 100644 --- a/packages/slate/package.json +++ b/packages/slate/package.json @@ -15,7 +15,7 @@ ], "dependencies": { "immer": "^8.0.1", - "is-plain-object": "^3.0.0", + "is-plain-object": "^5.0.0", "tiny-warning": "^1.0.3" }, "devDependencies": { diff --git a/packages/slate/src/interfaces/editor.ts b/packages/slate/src/interfaces/editor.ts index ae4a89747..ddb6cbb6b 100644 --- a/packages/slate/src/interfaces/editor.ts +++ b/packages/slate/src/interfaces/editor.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { Ancestor, diff --git a/packages/slate/src/interfaces/element.ts b/packages/slate/src/interfaces/element.ts index d467fc7b6..4bd9a245f 100644 --- a/packages/slate/src/interfaces/element.ts +++ b/packages/slate/src/interfaces/element.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { Editor, Node, Path, Descendant, ExtendedType, Ancestor } from '..' /** diff --git a/packages/slate/src/interfaces/operation.ts b/packages/slate/src/interfaces/operation.ts index e97431af8..1212b4b00 100644 --- a/packages/slate/src/interfaces/operation.ts +++ b/packages/slate/src/interfaces/operation.ts @@ -1,5 +1,5 @@ import { ExtendedType, Node, Path, Range } from '..' -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' export type BaseInsertNodeOperation = { type: 'insert_node' diff --git a/packages/slate/src/interfaces/point.ts b/packages/slate/src/interfaces/point.ts index 80576a198..36e8325f9 100644 --- a/packages/slate/src/interfaces/point.ts +++ b/packages/slate/src/interfaces/point.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { produce } from 'immer' import { ExtendedType, Operation, Path } from '..' diff --git a/packages/slate/src/interfaces/range.ts b/packages/slate/src/interfaces/range.ts index f1e268bb3..bcae4a688 100644 --- a/packages/slate/src/interfaces/range.ts +++ b/packages/slate/src/interfaces/range.ts @@ -1,5 +1,5 @@ import { produce } from 'immer' -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { ExtendedType, Operation, Path, Point, PointEntry } from '..' /** diff --git a/packages/slate/src/interfaces/text.ts b/packages/slate/src/interfaces/text.ts index 7771dbf36..a7a8a490e 100644 --- a/packages/slate/src/interfaces/text.ts +++ b/packages/slate/src/interfaces/text.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' import { Range } from '..' import { ExtendedType } from './custom-types' import { isDeepEqual } from '../utils/deep-equal' diff --git a/packages/slate/src/utils/deep-equal.ts b/packages/slate/src/utils/deep-equal.ts index 41f2d266f..623474c46 100644 --- a/packages/slate/src/utils/deep-equal.ts +++ b/packages/slate/src/utils/deep-equal.ts @@ -1,4 +1,4 @@ -import isPlainObject from 'is-plain-object' +import { isPlainObject } from 'is-plain-object' /* Custom deep equal comparison for Slate nodes. diff --git a/yarn.lock b/yarn.lock index c8f4992ca..8aee33852 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9191,13 +9191,6 @@ __metadata: languageName: node linkType: hard -"is-plain-object@npm:^3.0.0": - version: 3.0.1 - resolution: "is-plain-object@npm:3.0.1" - checksum: d13fe75db350d4ac669595cdfe0242ae87fcecddf2bca858d2dd443a6ed6eb1f69951fac8c2fa85b16106c6b0d7738fea86c2aca2ecee7fd61de15c1574f2cc5 - languageName: node - linkType: hard - "is-plain-object@npm:^5.0.0": version: 5.0.0 resolution: "is-plain-object@npm:5.0.0" @@ -14316,7 +14309,7 @@ resolve@^2.0.0-next.3: resolution: "slate-history@workspace:packages/slate-history" dependencies: "@babel/runtime": ^7.7.4 - is-plain-object: ^3.0.0 + is-plain-object: ^5.0.0 lodash: ^4.17.21 slate: ^0.65.3 slate-hyperscript: ^0.62.0 @@ -14331,7 +14324,7 @@ resolve@^2.0.0-next.3: resolution: "slate-hyperscript@workspace:packages/slate-hyperscript" dependencies: "@babel/runtime": ^7.7.4 - is-plain-object: ^3.0.0 + is-plain-object: ^5.0.0 slate: ^0.65.3 source-map-loader: ^0.2.4 peerDependencies: @@ -14429,7 +14422,7 @@ resolve@^2.0.0-next.3: "@types/react-dom": ^16.9.4 direction: ^1.0.3 is-hotkey: ^0.1.6 - is-plain-object: ^3.0.0 + is-plain-object: ^5.0.0 jsdom: ^16.6.0 lodash: ^4.17.4 react: ">=16.8.0" @@ -14453,7 +14446,7 @@ resolve@^2.0.0-next.3: dependencies: "@babel/runtime": ^7.7.4 immer: ^8.0.1 - is-plain-object: ^3.0.0 + is-plain-object: ^5.0.0 lodash: ^4.17.21 slate-hyperscript: ^0.62.0 source-map-loader: ^0.2.4