mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
* Deterministic updates High priority updates typically require less work to render than low priority ones. It's beneficial to flush those first, in their own batch, before working on more expensive low priority ones. We do this even if a high priority is scheduled after a low priority one. However, we don't want this reordering of updates to affect the terminal state. State should be deterministic: once all work has been flushed, the final state should be the same regardless of how they were scheduled. To get both properties, we store updates on the queue in insertion order instead of priority order (always append). Then, when processing the queue, we skip over updates with insufficient priority. Instead of removing updates from the queue right after processing them, we only remove them if there are no unprocessed updates before it in the list. This means that updates may be processed more than once. As a bonus, the new implementation is simpler and requires less code. * Fix ceiling function Mixed up the operators. * Remove addUpdate, addReplaceState, et al These functions don't really do anything. Simpler to use a single insertUpdateIntoFiber function. Also splits scheduleUpdate into two functions: - scheduleWork traverses a fiber's ancestor path and updates their expiration times. - scheduleUpdate inserts an update into a fiber's update queue, then calls scheduleWork. * Remove getExpirationTime The last remaining use for getExpirationTime was for top-level async updates. I moved that check to scheduleUpdate instead. * Move UpdateQueue insertions back to class module Moves UpdateQueue related functions out of the scheduler and back into the class component module. It's a bit awkward that now we need to pass around createUpdateExpirationForFiber, too. But we can still do without addUpdate, replaceUpdate, et al. * Store callbacks as an array of Updates Simpler this way. Also moves commitCallbacks back to UpdateQueue module. * beginUpdateQueue -> processUpdateQueue * Updates should never have an expiration of NoWork * Rename expiration related functions * Fix update queue Flow types Gets rid of an unneccessary null check
149 lines
5.0 KiB
JSON
149 lines
5.0 KiB
JSON
{
|
|
"name": "react-build",
|
|
"private": true,
|
|
"version": "16.0.0",
|
|
"devDependencies": {
|
|
"art": "^0.10.1",
|
|
"async": "^1.5.0",
|
|
"babel-cli": "^6.6.5",
|
|
"babel-core": "^6.0.0",
|
|
"babel-eslint": "^7.1.0",
|
|
"babel-jest": "20.1.0-delta.1",
|
|
"babel-plugin-check-es2015-constants": "^6.5.0",
|
|
"babel-plugin-external-helpers": "^6.22.0",
|
|
"babel-plugin-syntax-trailing-function-commas": "^6.5.0",
|
|
"babel-plugin-transform-async-to-generator": "^6.22.0",
|
|
"babel-plugin-transform-class-properties": "^6.11.5",
|
|
"babel-plugin-transform-es2015-arrow-functions": "^6.5.2",
|
|
"babel-plugin-transform-es2015-block-scoped-functions": "^6.5.0",
|
|
"babel-plugin-transform-es2015-block-scoping": "^6.23.0",
|
|
"babel-plugin-transform-es2015-classes": "^6.5.2",
|
|
"babel-plugin-transform-es2015-computed-properties": "^6.5.2",
|
|
"babel-plugin-transform-es2015-destructuring": "^6.5.0",
|
|
"babel-plugin-transform-es2015-for-of": "^6.5.2",
|
|
"babel-plugin-transform-es2015-literals": "^6.5.0",
|
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.5.2",
|
|
"babel-plugin-transform-es2015-object-super": "^6.5.0",
|
|
"babel-plugin-transform-es2015-parameters": "^6.5.0",
|
|
"babel-plugin-transform-es2015-shorthand-properties": "^6.5.0",
|
|
"babel-plugin-transform-es2015-spread": "^6.5.2",
|
|
"babel-plugin-transform-es2015-template-literals": "^6.5.2",
|
|
"babel-plugin-transform-es3-member-expression-literals": "^6.5.0",
|
|
"babel-plugin-transform-es3-property-literals": "^6.5.0",
|
|
"babel-plugin-transform-object-rest-spread": "^6.6.5",
|
|
"babel-plugin-transform-react-jsx-source": "^6.8.0",
|
|
"babel-preset-react": "^6.5.0",
|
|
"babel-traverse": "^6.9.0",
|
|
"babylon": "6.15.0",
|
|
"bundle-collapser": "^1.1.1",
|
|
"chalk": "^1.1.3",
|
|
"cli-table": "^0.3.1",
|
|
"coffee-script": "^1.8.0",
|
|
"core-js": "^2.2.1",
|
|
"coveralls": "^2.11.6",
|
|
"create-react-class": "^15.6.2",
|
|
"del": "^2.0.2",
|
|
"derequire": "^2.0.3",
|
|
"escape-string-regexp": "^1.0.5",
|
|
"eslint": "^3.10.2",
|
|
"eslint-config-fbjs": "^1.1.1",
|
|
"eslint-plugin-babel": "^3.3.0",
|
|
"eslint-plugin-flowtype": "^2.25.0",
|
|
"eslint-plugin-react": "^6.7.1",
|
|
"eslint-plugin-react-internal": "file:./eslint-rules",
|
|
"fbjs": "^0.8.16",
|
|
"fbjs-scripts": "^0.6.0",
|
|
"filesize": "^3.5.6",
|
|
"flow-bin": "^0.53.1",
|
|
"git-branch": "^0.3.0",
|
|
"glob": "^6.0.4",
|
|
"glob-stream": "^6.1.0",
|
|
"gzip-js": "~0.3.2",
|
|
"gzip-size": "^3.0.0",
|
|
"jasmine-check": "^1.0.0-rc.0",
|
|
"jest": "20.1.0-delta.1",
|
|
"jest-config": "20.1.0-delta.1",
|
|
"jest-jasmine2": "20.1.0-delta.1",
|
|
"jest-matchers": "20.1.0-delta.1",
|
|
"jest-runtime": "20.1.0-delta.1",
|
|
"merge-stream": "^1.0.0",
|
|
"minimist": "^1.2.0",
|
|
"ncp": "^2.0.0",
|
|
"object-assign": "^4.1.1",
|
|
"platform": "^1.1.0",
|
|
"prettier": "1.2.2",
|
|
"prop-types": "^15.6.0",
|
|
"rimraf": "^2.6.1",
|
|
"rollup": "^0.41.6",
|
|
"rollup-plugin-alias": "^1.2.1",
|
|
"rollup-plugin-babel": "^2.7.1",
|
|
"rollup-plugin-closure-compiler-js": "^1.0.4",
|
|
"rollup-plugin-commonjs": "^8.0.2",
|
|
"rollup-plugin-inject": "^2.0.0",
|
|
"rollup-plugin-node-resolve": "^2.0.0",
|
|
"rollup-plugin-replace": "^1.1.1",
|
|
"rollup-plugin-uglify": "^1.0.1",
|
|
"run-sequence": "^1.1.4",
|
|
"through2": "^2.0.0",
|
|
"tmp": "~0.0.28",
|
|
"typescript": "~1.8.10",
|
|
"uglify-js": "^2.5.0",
|
|
"yargs": "^6.3.0"
|
|
},
|
|
"devEngines": {
|
|
"node": "4.x || 5.x || 6.x || 7.x || 8.x",
|
|
"npm": "2.x || 3.x || 4.x || 5.x"
|
|
},
|
|
"commonerConfig": {
|
|
"version": 7
|
|
},
|
|
"scripts": {
|
|
"build": "npm run version-check && node scripts/rollup/build.js",
|
|
"linc": "git diff --name-only --diff-filter=ACMRTUB `git merge-base HEAD master` | grep '\\.js$' | xargs eslint --",
|
|
"lint": "node ./scripts/tasks/eslint.js",
|
|
"postinstall": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json",
|
|
"test": "jest",
|
|
"flow": "node ./scripts/tasks/flow.js",
|
|
"prettier": "node ./scripts/prettier/index.js write-changed",
|
|
"prettier-all": "node ./scripts/prettier/index.js write",
|
|
"version-check": "node ./scripts/tasks/version-check.js"
|
|
},
|
|
"jest": {
|
|
"modulePathIgnorePatterns": [
|
|
"/.module-cache/",
|
|
"<rootDir>/build/",
|
|
"<rootDir>/scripts/rollup/shims/",
|
|
"<rootDir>/scripts/bench/"
|
|
],
|
|
"transform": {
|
|
".*": "./scripts/jest/preprocessor.js"
|
|
},
|
|
"setupFiles": [
|
|
"./scripts/jest/setup.js",
|
|
"./scripts/jest/environment.js"
|
|
],
|
|
"setupTestFrameworkScriptFile": "./scripts/jest/test-framework-setup.js",
|
|
"testRegex": "/__tests__/.*(\\.js|coffee|ts)$",
|
|
"moduleFileExtensions": [
|
|
"js",
|
|
"json",
|
|
"node",
|
|
"coffee",
|
|
"ts"
|
|
],
|
|
"roots": [
|
|
"<rootDir>/eslint-rules",
|
|
"<rootDir>/mocks",
|
|
"<rootDir>/scripts",
|
|
"<rootDir>/src",
|
|
"node_modules/fbjs"
|
|
],
|
|
"collectCoverageFrom": [
|
|
"src/**/*.js",
|
|
"!src/__mocks__/vendor/third_party/*.js",
|
|
"!src/test/*.js"
|
|
],
|
|
"timers": "fake"
|
|
}
|
|
}
|