1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-06 05:49:47 +01:00
slate/package.json
Ian Storm Taylor 00d5785226
deprecate isVoid and related properties/methods (#2102)
#### Is this adding or improving a _feature_ or fixing a _bug_?

Improvement.

#### What's the new behavior?

This deprecates the `node.isVoid` property in favor of using `schema.isVoid(node)`, which will allow us to remove the hardcoded "void" concept from the data model, and have it depend on the schema instead. 

This allows you to build different kinds of editors, with different void semantics, depending on your use case, without having this information hardcoded in the data itself. Even switching the `isVoid` semantics on the fly based on a user toggling a setting for example.

#### How does this change work?

This is the first step, which just deprecates `node.isVoid`, and provides the new alternative of `schema.isVoid(node)`, while still using the `isVoid` value of nodes under the covers.

The next step is to change the logic to search the schema for real, and completely remove the `isVoid` value from nodes.

#### Have you checked that...?

<!-- 
Please run through this checklist for your pull request: 
-->

* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)
2018-08-21 15:52:44 -07:00

117 lines
4.3 KiB
JSON

{
"private": true,
"name": "slate-packages",
"workspaces": [
"packages/*"
],
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.1",
"babel-loader": "^7.1.2",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-module-resolver": "^3.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-runtime": "^6.26.0",
"blanket": "^1.2.3",
"chalk": "^1.1.3",
"codecov": "^3.0.4",
"commander": "^2.15.1",
"copy-webpack-plugin": "^4.4.1",
"cross-env": "^5.1.3",
"css-loader": "^0.28.9",
"emojis": "^1.0.10",
"emotion": "^9.2.4",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-prettier": "^2.5.0",
"eslint-plugin-react": "^7.6.0",
"extract-text-webpack-plugin": "^3.0.2",
"faker": "^3.1.0",
"figures": "^2.0.0",
"fs-promise": "^1.0.0",
"gh-pages": "^0.11.0",
"html-webpack-plugin": "^2.30.1",
"html-webpack-template": "^6.1.0",
"image-extensions": "^1.1.0",
"immutable": "^3.8.1",
"is-hotkey": "^0.1.1",
"is-url": "^1.2.2",
"jsdom": "^11.5.1",
"lerna": "^2.7.1",
"lodash": "^4.17.4",
"matcha": "^0.7.0",
"memoize-one": "^4.0.0",
"mocha": "^2.5.3",
"mocha-lcov-reporter": "^1.3.0",
"npm-run-all": "^4.1.2",
"nyc": "^12.0.2",
"prettier": "^1.10.2",
"prismjs": "^1.5.1",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-emotion": "^9.2.4",
"react-hot-loader": "^3.1.3",
"react-portal": "^4.1.5",
"react-router-dom": "^4.3.1",
"react-values": "^0.3.0",
"read-metadata": "^1.0.0",
"rollup": "^0.55.1",
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^8.3.0",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.1.0",
"rollup-plugin-node-resolve": "^3.0.2",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-uglify": "^3.0.0",
"slate-collapse-on-escape": "^0.6.0",
"slate-dev-benchmark": "*",
"slate-dev-test-utils": "*",
"slate-soft-break": "^0.6.0",
"source-map-loader": "^0.2.3",
"source-map-support": "^0.4.0",
"style-loader": "^0.20.2",
"to-camel-case": "^1.0.0",
"to-snake-case": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.1.8",
"webpack": "^3.11.0",
"webpack-dev-server": "^2.11.1"
},
"peerDependencies": {
"slate": "*",
"slate-html-serializer": "*",
"slate-plain-serializer": "*",
"slate-react": "*",
"slate-schema-violations": "*"
},
"scripts": {
"benchmark": "cross-env COMPARE=compare node --expose-gc ./tmp/benchmark/index.js",
"benchmark:save": " yarn benchmark:prepare && node --expose-gc ./tmp/benchmark/index.js",
"benchmark:prepare": "mkdir -p ./tmp && cross-env BABEL_ENV=benchmark babel benchmark --out-dir tmp/benchmark/",
"bootstrap": "lerna bootstrap && yarn build",
"build": "rollup --config ./support/rollup/config.js",
"build:production": "cross-env NODE_ENV=production rollup --config ./support/rollup/config.js && cross-env NODE_ENV=production webpack --config support/webpack/config.js",
"clean": "lerna run clean && rm -rf ./node_modules ./dist ./build",
"gh-pages": "gh-pages --dist ./build",
"lint": "yarn lint:eslint && yarn lint:prettier",
"lint:eslint": "eslint benchmark packages/*/src packages/*/test examples/*/*.js examples/dev/*/*.js",
"lint:prettier": "prettier --list-different '**/*.{md,json,css}'",
"open": "open http://localhost:8080",
"prettier": "prettier --write '**/*.{js,jsx,md,json,css}'",
"release": "yarn build:production && yarn test && yarn lint && lerna publish && yarn gh-pages",
"server": "webpack-dev-server --config ./support/webpack/config.js",
"start": "npm-run-all --parallel --print-label watch server",
"test": "cross-env BABEL_ENV=test FORBID_WARNINGS=true mocha --require babel-core/register ./packages/*/test/index.js",
"test:coverage": "cross-env NODE_ENV=test nyc yarn test",
"watch": "rollup --config ./support/rollup/config.js --watch"
}
}