From acf48196689e955b6fc43da7def969bac238882d Mon Sep 17 00:00:00 2001 From: Soreine Date: Tue, 18 Sep 2018 17:12:03 +0200 Subject: [PATCH 1/5] Upgrade deps --- package.json | 8 +-- yarn.lock | 151 ++++++++++++++++++++++++++++----------------------- 2 files changed, 86 insertions(+), 73 deletions(-) diff --git a/package.json b/package.json index 073d3fa..48dcf2e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "stringify-object": "^3.2.2" }, "peerDependencies": { - "slate": "*" + "@gitbook/slate": "*" }, "devDependencies": { "babel-cli": "^6.26.0", @@ -41,9 +41,9 @@ "mocha": "^3.0.1", "react": "^15.6.1", "react-dom": "^15.6.1", - "slate": "^0.34.7", - "slate-hyperscript": "^0.5.9", - "slate-react": "^0.12.3" + "@gitbook/slate": "^0.34.7", + "@gitbook/slate-hyperscript": "^0.5.22", + "@gitbook/slate-react": "^0.13.4" }, "scripts": { "build": "babel ./src --out-dir ./dist", diff --git a/yarn.lock b/yarn.lock index d513961..cd32d78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,6 +55,87 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" +"@gitbook/slate-base64-serializer@^0.2.41": + version "0.2.41" + resolved "https://registry.yarnpkg.com/@gitbook/slate-base64-serializer/-/slate-base64-serializer-0.2.41.tgz#a391b62c8d87083137e3cd667ac604829103942f" + dependencies: + isomorphic-base64 "^1.0.2" + +"@gitbook/slate-dev-environment@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@gitbook/slate-dev-environment/-/slate-dev-environment-0.1.2.tgz#db3e0bc21a8c2e2833911ea6be010480d39feae4" + dependencies: + is-in-browser "^1.1.3" + +"@gitbook/slate-dev-logger@^0.1.39": + version "0.1.39" + resolved "https://registry.yarnpkg.com/@gitbook/slate-dev-logger/-/slate-dev-logger-0.1.39.tgz#86cb39b8c535a480d31ab3636007911b6f7a3742" + +"@gitbook/slate-hotkeys@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@gitbook/slate-hotkeys/-/slate-hotkeys-0.1.2.tgz#6ef554b925f84e72f99734196d42f7c6679c772b" + dependencies: + "@gitbook/slate-dev-environment" "^0.1.2" + is-hotkey "^0.1.1" + +"@gitbook/slate-hyperscript@^0.5.22": + version "0.5.22" + resolved "https://registry.yarnpkg.com/@gitbook/slate-hyperscript/-/slate-hyperscript-0.5.22.tgz#b7fb270296852d961408840dd605cc0cdd156e19" + dependencies: + "@gitbook/slate-dev-logger" "^0.1.39" + is-empty "^1.0.0" + is-plain-object "^2.0.4" + +"@gitbook/slate-plain-serializer@^0.5.22": + version "0.5.22" + resolved "https://registry.yarnpkg.com/@gitbook/slate-plain-serializer/-/slate-plain-serializer-0.5.22.tgz#68f2dc82443ae6b326d17d379d44cdfb418dcebc" + dependencies: + "@gitbook/slate-dev-logger" "^0.1.39" + +"@gitbook/slate-prop-types@^0.4.39": + version "0.4.39" + resolved "https://registry.yarnpkg.com/@gitbook/slate-prop-types/-/slate-prop-types-0.4.39.tgz#267cfc25c860b8feb73af733c0d8a524a8801cea" + dependencies: + "@gitbook/slate-dev-logger" "^0.1.39" + +"@gitbook/slate-react@^0.13.4": + version "0.13.4" + resolved "https://registry.yarnpkg.com/@gitbook/slate-react/-/slate-react-0.13.4.tgz#d07f4ecc384900d20284d19e27b8eb9e1982cdd8" + dependencies: + "@gitbook/slate-base64-serializer" "^0.2.41" + "@gitbook/slate-dev-environment" "^0.1.2" + "@gitbook/slate-dev-logger" "^0.1.39" + "@gitbook/slate-hotkeys" "^0.1.2" + "@gitbook/slate-plain-serializer" "^0.5.22" + "@gitbook/slate-prop-types" "^0.4.39" + debug "^3.1.0" + get-window "^1.1.1" + is-window "^1.0.2" + keycode "^2.1.2" + lodash "^4.1.1" + prop-types "^15.5.8" + react-immutable-proptypes "^2.1.0" + react-portal "^3.1.0" + selection-is-backward "^1.0.0" + +"@gitbook/slate-schema-violations@^0.1.20": + version "0.1.20" + resolved "https://registry.yarnpkg.com/@gitbook/slate-schema-violations/-/slate-schema-violations-0.1.20.tgz#1e799757b79472a15938f05cd90923ea6750388b" + +"@gitbook/slate@^0.34.7": + version "0.34.7" + resolved "https://registry.yarnpkg.com/@gitbook/slate/-/slate-0.34.7.tgz#ecc0ddeac9d5e8380fb4b93e1b47306d139504ba" + dependencies: + "@gitbook/slate-dev-logger" "^0.1.39" + "@gitbook/slate-schema-violations" "^0.1.20" + debug "^3.1.0" + direction "^0.1.5" + esrever "^0.2.0" + is-empty "^1.0.0" + is-plain-object "^2.0.4" + lodash "^4.17.4" + type-of "^2.0.1" + JSONStream@^1.0.3: version "1.3.1" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" @@ -1481,7 +1562,7 @@ debug@2.6.8: dependencies: ms "2.0.0" -debug@^2.2.0, debug@^2.3.2, debug@^2.6.8: +debug@^2.2.0, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -3826,74 +3907,6 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" -slate-base64-serializer@^0.2.28: - version "0.2.28" - resolved "https://registry.yarnpkg.com/slate-base64-serializer/-/slate-base64-serializer-0.2.28.tgz#141a93654b58203e82ee24c4068107a67b72aff8" - dependencies: - isomorphic-base64 "^1.0.2" - -slate-dev-logger@^0.1.39: - version "0.1.39" - resolved "https://registry.yarnpkg.com/slate-dev-logger/-/slate-dev-logger-0.1.39.tgz#744a69b85034244713e6de51483af5713c345af4" - -slate-hyperscript@^0.5.9: - version "0.5.9" - resolved "https://registry.yarnpkg.com/slate-hyperscript/-/slate-hyperscript-0.5.9.tgz#b0b8ed64ea93be2d2b5c1aa480e8a0bcda9c399e" - dependencies: - is-empty "^1.0.0" - is-plain-object "^2.0.4" - slate-dev-logger "^0.1.39" - -slate-plain-serializer@^0.5.9: - version "0.5.9" - resolved "https://registry.yarnpkg.com/slate-plain-serializer/-/slate-plain-serializer-0.5.9.tgz#dc6ac5d10c46cac1bfa8d9af36f5e76d766fd57e" - dependencies: - slate-dev-logger "^0.1.39" - -slate-prop-types@^0.4.26: - version "0.4.26" - resolved "https://registry.yarnpkg.com/slate-prop-types/-/slate-prop-types-0.4.26.tgz#72ef2b6fded5893a2a0a273f679b92c4eee99e73" - dependencies: - slate-dev-logger "^0.1.39" - -slate-react@^0.12.3: - version "0.12.3" - resolved "https://registry.yarnpkg.com/slate-react/-/slate-react-0.12.3.tgz#3d0739af6930ae2a178fa90da480d5106ba1c504" - dependencies: - debug "^2.3.2" - get-window "^1.1.1" - is-hotkey "^0.1.1" - is-in-browser "^1.1.3" - is-window "^1.0.2" - keycode "^2.1.2" - lodash "^4.1.1" - prop-types "^15.5.8" - react-immutable-proptypes "^2.1.0" - react-portal "^3.1.0" - selection-is-backward "^1.0.0" - slate-base64-serializer "^0.2.28" - slate-dev-logger "^0.1.39" - slate-plain-serializer "^0.5.9" - slate-prop-types "^0.4.26" - -slate-schema-violations@^0.1.20: - version "0.1.39" - resolved "https://registry.yarnpkg.com/slate-schema-violations/-/slate-schema-violations-0.1.39.tgz#854ab5624136419cef4c803b1823acabe11f1c15" - -slate@^0.34.7: - version "0.34.7" - resolved "https://registry.yarnpkg.com/slate/-/slate-0.34.7.tgz#5908e1d0fc092a2212488beca65671f01e0eb80a" - dependencies: - debug "^3.1.0" - direction "^0.1.5" - esrever "^0.2.0" - is-empty "^1.0.0" - is-plain-object "^2.0.4" - lodash "^4.17.4" - slate-dev-logger "^0.1.39" - slate-schema-violations "^0.1.20" - type-of "^2.0.1" - slice-ansi@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" From aa47b6befe02b2b86cd30f4eabc38b99d00a846e Mon Sep 17 00:00:00 2001 From: Soreine Date: Tue, 18 Sep 2018 17:30:19 +0200 Subject: [PATCH 2/5] Update imports --- README.md | 5 +++++ src/bin/cli.js | 2 +- src/types.js | 2 +- tests/all.js | 2 +- tests/h.js | 2 +- website/main.js | 2 +- website/value.js | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a259d76..b63cf67 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,11 @@ You can use `slate-hyperprint` as a library to: See the [online demo](https://soreine.github.io/slate-hyperprint), that converts a Slate JSON representation to a Slate hyperscript representation. +> ⚠️ This repository is now using GitBook's fork of [ianstormtaylor/slate](https://github.com/ianstormtaylor/slate). +> Previous versions are still [available on NPM](https://www.npmjs.com/package/slate-hyperprint) +> All the versions using GitBook's fork of slate are now published under the `@gitbook` NPM scope. +> To learn more about why we forked Slate, read [our manifest](https://github.com/GitbookIO/slate/blob/master/Readme.md) + # Setup ``` diff --git a/src/bin/cli.js b/src/bin/cli.js index 4e13ed3..025b0cd 100644 --- a/src/bin/cli.js +++ b/src/bin/cli.js @@ -3,7 +3,7 @@ import fs from 'fs'; import yaml from 'js-yaml'; -import Slate from 'slate'; +import Slate from '@gitbook/slate'; import meow from 'meow'; import hyperprint from '../'; diff --git a/src/types.js b/src/types.js index 406d68d..a5e84fc 100644 --- a/src/types.js +++ b/src/types.js @@ -1,5 +1,5 @@ /* @flow */ -import type { Value, Document, Block, Inline, Text, Range } from 'slate'; +import type { Value, Document, Block, Inline, Text, Range } from '@gitbook/slate'; export type SlateModel = Value | Document | Block | Inline | Text | Range; diff --git a/tests/all.js b/tests/all.js index 65b1445..cc3e55e 100644 --- a/tests/all.js +++ b/tests/all.js @@ -1,7 +1,7 @@ import assert from 'assert'; import fs from 'fs'; import { basename, extname, resolve } from 'path'; -import { resetKeyGenerator } from 'slate'; +import { resetKeyGenerator } from '@gitbook/slate'; import hyperprint from '../src'; /** diff --git a/tests/h.js b/tests/h.js index 0dbdb31..d93257e 100644 --- a/tests/h.js +++ b/tests/h.js @@ -1,4 +1,4 @@ -import { createHyperscript } from 'slate-hyperscript'; +import { createHyperscript } from '@gitbook/slate-hyperscript'; const h = createHyperscript({ blocks: { diff --git a/website/main.js b/website/main.js index 8cffa8b..2370fe5 100644 --- a/website/main.js +++ b/website/main.js @@ -3,7 +3,7 @@ /* eslint-disable import/no-extraneous-dependencies */ import React from 'react'; import ReactDOM from 'react-dom'; -import Slate from 'slate'; +import Slate from '@gitbook/slate'; import hyperprint from '../dist/'; import INITIAL_VALUE from './value'; diff --git a/website/value.js b/website/value.js index d66d207..73759c2 100644 --- a/website/value.js +++ b/website/value.js @@ -1,6 +1,6 @@ /** @jsx h */ // eslint-disable-next-line import/no-extraneous-dependencies -import { createHyperscript } from 'slate-hyperscript'; +import { createHyperscript } from '@gitbook/slate-hyperscript'; const h = createHyperscript({ blocks: { From fd714fd4451b6ab44dbafa2bc0ac4c9bc5d44153 Mon Sep 17 00:00:00 2001 From: Soreine Date: Tue, 18 Sep 2018 17:38:48 +0200 Subject: [PATCH 3/5] Scope this package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48dcf2e..3613bc7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "slate-hyperprint", + "name": "@gitbook/slate-hyperprint", "description": "A Slate plugin to print Slate models to their slate-hyperscript representation.", "version": "2.2.6", "license": "Apache-2.0", From f897780848c8698cd8e49ded0f3099d4734d06e3 Mon Sep 17 00:00:00 2001 From: Soreine Date: Wed, 19 Sep 2018 10:59:57 +0200 Subject: [PATCH 4/5] Lint --- src/types.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/types.js b/src/types.js index a5e84fc..0ac8cdf 100644 --- a/src/types.js +++ b/src/types.js @@ -1,5 +1,12 @@ /* @flow */ -import type { Value, Document, Block, Inline, Text, Range } from '@gitbook/slate'; +import type { + Value, + Document, + Block, + Inline, + Text, + Range +} from '@gitbook/slate'; export type SlateModel = Value | Document | Block | Inline | Text | Range; From 8f4042d658625ca10a67effa73e446306574855f Mon Sep 17 00:00:00 2001 From: Soreine Date: Wed, 19 Sep 2018 11:00:25 +0200 Subject: [PATCH 5/5] Fix tests --- tests/fixtures/sort-attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/sort-attributes.js b/tests/fixtures/sort-attributes.js index 0b49f35..25d31aa 100644 --- a/tests/fixtures/sort-attributes.js +++ b/tests/fixtures/sort-attributes.js @@ -17,7 +17,7 @@ const input = ( const output = ` - +