Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

15-next #7000

Closed
wants to merge 81 commits into from
Closed

15-next #7000

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
957275e
Merge pull request #6364 from p-jackson/issue-5700
jimfb Apr 7, 2016
49383f3
Merge pull request #6605 from gaearon/fix-warning-condition
gaearon Apr 25, 2016
3aa7f65
fixed a minor typo (#6600)
stolenkid Apr 25, 2016
1589c73
Merge pull request #6638 from cpojer/master
cpojer Apr 28, 2016
6a4a40d
package(node-engine-version): accept 6.x versions (#6645)
RaitoBezarius Apr 28, 2016
7435425
Remove errant console.log (#6664)
wincent Apr 30, 2016
0fdd14f
Add test logic to make sure that events get tested when rendering on …
aickin Apr 30, 2016
21d4416
Set up Flow - Yay! (#6682)
sebmarkbage May 3, 2016
9c566da
grunt jest tasks shouldn't use watchman (#6675)
zpao May 3, 2016
d202970
Fix for #6062 : Show source line number on unknown property warning …
troydemonbreun May 3, 2016
635ec74
Setup grunt flow task and run on travis (#6684)
zpao May 4, 2016
2e9a66f
fixed transform-react-jsx-source devDep (#6697)
keyz May 4, 2016
1e4dade
[DOCS] ReactTextComponent was renamed ReactDOMTextComponent a while a…
jayphelps May 4, 2016
62dbf10
Move dev-only flags to only exist on composites (#6709)
sophiebits May 5, 2016
c510b29
Cleanup: remove @nolint (#6703)
zpao May 5, 2016
2cc2157
Disable coverage on Travis (#6712)
sophiebits May 6, 2016
d9966e0
Get patch versions of Flow (#6716)
sebmarkbage May 6, 2016
8d633a5
allow to ignore value attribute for option (#5362)
yiminghe May 9, 2016
04862d5
fix minor capitalzation typo (#6736)
bradford-hamilton May 10, 2016
d2635f2
Merge pull request #6377 from puradox/proptypes-symbol
gaearon May 10, 2016
220cfc9
Fix flow errors (#6719)
sebmarkbage May 10, 2016
d421ab8
React Fiber Reconciler (#6690)
sebmarkbage May 11, 2016
cd59a69
Rename host-y things to be "host" not "native" (#6754)
sophiebits May 12, 2016
1f85ba0
Fixed removing attributes during custom element update. Fixes #6747 (…
grassator May 13, 2016
660b4f5
Remove some dead code (#6764)
sophiebits May 13, 2016
af0a915
Merge pull request #6763 from nfcampos/is-running
gaearon May 13, 2016
94d3411
Merge pull request #6767 from gaearon/fix-broken-master
gaearon May 14, 2016
4fd847d
Fixed an invalid escape char in attribute name regexp (#6772)
nbjahan May 14, 2016
8ac54fa
Track source more generically in ReactComponentTreeDevtool (#6765)
sophiebits May 14, 2016
20e467c
Print stack in devtool exception warning (#6768)
sophiebits May 14, 2016
edb81e5
Fix severe perf problems in component tree devtool (#6770)
sophiebits May 14, 2016
7bf9a10
Show component stack in PropTypes warnings (#6771)
sophiebits May 15, 2016
f1d2722
Remove unnecessary require causing excess memory usage (#6781)
sebmck May 16, 2016
7f9722b
Embed JSX filename paths relative to repo root (#6778)
sophiebits May 16, 2016
3d107f0
Require modules from React Native as node modules. (#6715)
davidaurelio May 16, 2016
2f37237
Merge pull request #6787 from gaearon/tree-devtool-test-tweaks
gaearon May 17, 2016
05e99eb
Fire unknown prop warning when rendering client side. (#6693)
jimfb May 17, 2016
fa735b5
Merge pull request #6789 from gaearon/tree-devtool-fixes
gaearon May 17, 2016
80b9ff3
Merge pull request #6801 from iamdustan/instrumentation-to-shared
gaearon May 19, 2016
bfbe052
Minor comment typo (#6808)
rivertam May 19, 2016
048a95f
Merge pull request #6804 from dmitriiabramov/update_typescript
zpao May 20, 2016
3fa9130
Add component stack info to key validation warnings (#6799)
keyz May 20, 2016
16b408c
Support onLoad event on link element (#6815)
roderickhsiao May 21, 2016
56ead57
Move ReactElementValidator to __DEV__ block (#6830)
ruiaraujo May 22, 2016
e4cd101
Remove prop types checking in ReactCompositeComponent (#6824)
keyz May 23, 2016
854b0c5
Removed unnecessary null check (#6841)
jimfb May 23, 2016
1967d6a
Extract the type checker into a separate module (#6851)
keyz May 24, 2016
32f9655
Add test to ensure 'undefined' children is used (#6853)
sophiebits May 24, 2016
f7c9d93
Avoid directly calling hasOwnProperty (#6855)
alitaheri May 24, 2016
60897bb
Fix componentWillUnmount() not counted by ReactPerf (#6858)
gaearon May 24, 2016
f476de4
Merge pull request #6775 from spicyj/fix-art
sophiebits May 24, 2016
23d2540
Remove unknown props in ART (#6861)
sophiebits May 25, 2016
262f85d
Properly set value and defaultValue for input and textarea (#6406)
jimfb May 25, 2016
22d1bdc
Add warning for unknown properties. (#6800)
jimfb May 25, 2016
c0e2f41
Don't count the time inside flushes towards lifecycle hooks (#6860)
gaearon May 25, 2016
148c610
Fix instrumentation in shallow rendering (#6867)
sophiebits May 25, 2016
013f27b
Merge pull request #6872 from gaearon/jest-cli@12
gaearon May 25, 2016
2c4a03e
Make sure cloneElement() supports prototype-less config (#6878)
gaearon May 25, 2016
80b79a2
Warn when element is missing in devtool (#6869)
sophiebits May 26, 2016
74b5f29
Merge pull request #6880 from gaearon/clone-key-ref-props-2
gaearon May 26, 2016
d030816
Merge pull request #6886 from Weizenlol/patch-1
gaearon May 26, 2016
3b84c98
Stop passing null as second argument to document.createElement() (#6896)
darobin May 26, 2016
9f5c5d3
Merge pull request #6859 from sebmarkbage/newreconciler
sebmarkbage May 27, 2016
1881560
Merge pull request #6677 from zpao/dont-warn-css-0-string
zpao May 27, 2016
3a9b2de
Followup to 6896, add explanation of workaround. (#6905)
jimfb May 27, 2016
7a991a7
Added more specific warning for using onDblClick instead of onDoubleC…
natenorberg May 27, 2016
d24fa44
Fix style test for Jasmine 2 (#6913)
sophiebits May 28, 2016
25f1ca9
Fix minor lint warnings (#6909)
lexjacobs May 28, 2016
dc8a2ff
Merge pull request #6903 from sebmarkbage/newreconciler
sebmarkbage May 31, 2016
9a014c9
Merge pull request #6931 from sebmarkbage/newreconciler
sebmarkbage May 31, 2016
763605b
Add rudimentary test renderer (#6944)
sophiebits Jun 1, 2016
c1ccb26
Replace the implementation of escapeTextContentForBrowser with escape…
aickin Jun 2, 2016
3ce1a61
Merge pull request #6957 from zpao/flow026
zpao Jun 3, 2016
41207fa
Fix null node issue in ReactCSSTransitionGroup (#6958)
keyz Jun 3, 2016
0a1507d
Fix function declaration in if statement (#6963)
sophiebits Jun 4, 2016
1a2c756
Warn that ReactPerf does not work in the production build (#6884)
sashashakun Jun 6, 2016
bdfb3e7
Tweak ReactPerf warning message and code style (#6977)
gaearon Jun 6, 2016
df578b9
Fix autofocus for input and textarea (#6986)
jimfb Jun 7, 2016
9358c19
Add reactProdInvariant and corresponding babel rewrite pass (#6948)
keyz Jun 8, 2016
e90e878
Improve error message for components in bad states (missing instance)…
yungsters Jun 8, 2016
dbde640
Fix #6950, work around IE missing innerHTML on SVG nodes (#6982)
joshhunt Jun 8, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"presets": ["react"],
"ignore": ["third_party"],
"plugins": [
"fbjs-scripts/babel-6/dev-expression",
"syntax-trailing-function-commas",
"babel-plugin-transform-object-rest-spread",
"transform-es2015-template-literals",
Expand All @@ -22,6 +21,7 @@
"transform-es2015-modules-commonjs",
"transform-es3-member-expression-literals",
"transform-es3-property-literals",
"./scripts/babel/transform-object-assign-require"
"./scripts/babel/transform-object-assign-require",
"transform-react-jsx-source"
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# We can probably lint these later but not important at this point
src/renderers/art
src/shared/vendor
# But not in docs/_js/examples/*
docs/_js/*.js
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
'indent': [ERROR, 2, {SwitchCase: 1}],
'jsx-quotes': [ERROR, 'prefer-double'],
'no-bitwise': OFF,
'no-inner-declarations': [ERROR, 'functions'],
'no-multi-spaces': ERROR,
'no-restricted-syntax': [ERROR, 'WithStatement'],
'no-shadow': ERROR,
Expand Down
37 changes: 37 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[ignore]

.*/examples/.*
.*/build/.*
.*/node_modules/y18n/.*
.*/__mocks__/.*
.*/__tests__/.*

# Ignore Docs
.*/docs/.*

[include]

[libs]
./node_modules/fbjs/flow/lib
./flow

[options]
module.system=haste

esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable

experimental.strict_type_args=true

munge_underscores=false

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-4]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-4]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
^0.26.0
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,14 @@ script:
fi
elif [ "$TEST_TYPE" = test ]; then
set -e
./node_modules/.bin/grunt jest:normal
# Disabling coverage because it's broken:
# https://travis-ci.org/facebook/react/jobs/128163922
if false; then
./node_modules/.bin/grunt jest:coverage
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
else
./node_modules/.bin/grunt jest:normal
fi
echo 'Testing in server-render (HTML generation) mode...'
printf '\nmodule.exports.useCreateElement = false;\n' \
>> src/renderers/dom/shared/ReactDOMFeatureFlags.js
Expand All @@ -83,6 +90,7 @@ env:
- TEST_TYPE=build
- TEST_TYPE=test
- TEST_TYPE=lint
- TEST_TYPE=flow
- TEST_TYPE=build_website
global:
# SERVER
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -874,14 +874,14 @@ Each of these changes will continue to work as before with a new warning until t

* Upgrade Commoner so `require` statements are no longer relativized when passing through the transformer. This was a feature needed when building React, but doesn't translate well for other consumers of `bin/jsx`.
* Upgraded our dependencies on Commoner and Recast so they use a different directory for their cache.
* Freeze our esprima dependency.
* Freeze our Esprima dependency.


## 0.3.2 (May 31, 2013)

### JSX

* Improved compatability with other coding styles (specifically, multiple assignments with a single `var`).
* Improved compatibility with other coding styles (specifically, multiple assignments with a single `var`).

### react-tools

Expand Down
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ module.exports = function(grunt) {

grunt.registerTask('lint', ['eslint']);

grunt.registerTask('flow', require('./grunt/tasks/flow'));

grunt.registerTask('delete-build-modules', function() {
// Use gulp here.
spawnGulp(['react:clean'], null, this.async());
Expand Down
20 changes: 20 additions & 0 deletions flow/environment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/

/* eslint-disable */

declare var __REACT_DEVTOOLS_GLOBAL_HOOK__: any; /*?{
inject: ?((stuff: Object) => void)
};*/

// temporary patches for React.Component and React.Element
declare var ReactComponent: typeof React$Component;
declare var ReactElement: typeof React$Element;
44 changes: 44 additions & 0 deletions flow/react-native-host-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/

/* eslint-disable */

declare module 'deepDiffer' {
declare function exports(one: any, two: any): bool;
}
declare module 'deepFreezeAndThrowOnMutationInDev' {
declare function exports<T>(obj : T) : T;
}
declare module 'flattenStyle' { }
declare module 'InitializeJavaScriptAppEngine' { }
declare module 'RCTEventEmitter' {
declare function register() : void;
}
declare module 'TextInputState' {
declare function blurTextInput(object : any) : void;
declare function focusTextInput(object : any) : void;
}
declare module 'UIManager' {
declare var customBubblingEventTypes : Object;
declare var customDirectEventTypes : Object;
declare function createView() : void;
declare function manageChildren() : void;
declare function measure() : void;
declare function measureInWindow() : void;
declare function measureLayout() : void;
declare function removeRootView() : void;
declare function removeSubviewsFromContainerWithID() : void;
declare function replaceExistingNonRootView() : void;
declare function setChildren() : void;
declare function setChildren() : void;
declare function updateView() : void;
}
declare module 'View' { }
22 changes: 22 additions & 0 deletions grunt/tasks/flow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

var grunt = require('grunt');

var extension = process.platform === 'win32' ? '.cmd': '';

module.exports = function() {
var done = this.async();
grunt.util.spawn({
cmd: 'node_modules/.bin/flow' + extension,
args: ['check', '.'],
opts: {stdio: 'inherit'},
}, function(err, result, code) {
if (err) {
grunt.log.error('Flow failed');
} else {
grunt.log.ok('Flow passed');
}

done(code === 0);
});
};
22 changes: 13 additions & 9 deletions grunt/tasks/jest.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// We run our own grunt task instead of using grunt-jest so that we can have
// more control. Specifically we want to set NODE_ENV and make sure stdio is
// inherited. We also run with --harmony directly so that we don't have to
// respawn immediately. We should be able to reduce some of this complexity
// when jest 0.5 is run on top of iojs.

'use strict';

var async = require('async');
Expand Down Expand Up @@ -52,6 +46,7 @@ function getJestConfig(callback) {
getCollectCoverageOnlyFrom(function(err, data) {
callback(err, Object.assign({}, config, {
rootDir: rootDir,
name: 'react',
collectCoverage: true,
collectCoverageOnlyFrom: data,
}));
Expand All @@ -75,16 +70,25 @@ function writeTempConfig(callback) {
}

function run(done, configPath) {
grunt.log.writeln('running jest (this may take a while)');
grunt.log.writeln('running jest');

var args = ['--harmony', path.join('node_modules', 'jest-cli', 'bin', 'jest'), '--runInBand'];
var args = [
path.join('node_modules', 'jest', 'bin', 'jest'),
'--runInBand',
'--no-watchman',
];
if (configPath) {
args.push('--config', configPath);
}
grunt.util.spawn({
cmd: 'node',
args: args,
opts: { stdio: 'inherit', env: { NODE_ENV: 'test' } },
opts: {
stdio: 'inherit',
env: Object.assign({}, process.env, {
NODE_ENV: 'test',
}),
},
}, function(spawnErr, result, code) {
if (spawnErr) {
onError(spawnErr);
Expand Down
39 changes: 18 additions & 21 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var del = require('del');

var babelPluginModules = require('fbjs-scripts/babel-6/rewrite-modules');
var extractErrors = require('./scripts/error-codes/gulp-extract-errors');
var devExpressionWithCodes = require('./scripts/error-codes/dev-expression-with-codes');

var paths = {
react: {
Expand All @@ -24,40 +25,36 @@ var paths = {
'!src/**/__benchmarks__/**/*.js',
'!src/**/__tests__/**/*.js',
'!src/**/__mocks__/**/*.js',
'!src/renderers/art/**/*.js',
'!src/shared/vendor/**/*.js',
],
lib: 'build/modules',
},
};

var fbjsModuleMap = require('fbjs/module-map');
var moduleMap = {};
for (var key in fbjsModuleMap) {
moduleMap[key] = fbjsModuleMap[key];
}
var whiteListNames = [
'deepDiffer',
'deepFreezeAndThrowOnMutationInDev',
'flattenStyle',
'InitializeJavaScriptAppEngine',
'RCTEventEmitter',
'TextInputState',
'UIManager',
'View',
];

whiteListNames.forEach(function(name) {
moduleMap[name] = name;
});

moduleMap['object-assign'] = 'object-assign';
var moduleMap = Object.assign(
{'object-assign': 'object-assign'},
require('fbjs/module-map'),
{
deepDiffer: 'react-native/lib/deepDiffer',
deepFreezeAndThrowOnMutationInDev: 'react-native/lib/deepFreezeAndThrowOnMutationInDev',
flattenStyle: 'react-native/lib/flattenStyle',
InitializeJavaScriptAppEngine: 'react-native/lib/InitializeJavaScriptAppEngine',
RCTEventEmitter: 'react-native/lib/RCTEventEmitter',
TextInputState: 'react-native/lib/TextInputState',
UIManager: 'react-native/lib/UIManager',
UIManagerStatTracker: 'react-native/lib/UIManagerStatTracker',
View: 'react-native/lib/View',
}
);

var errorCodeOpts = {
errorMapFilePath: 'scripts/error-codes/codes.json',
};

var babelOpts = {
plugins: [
devExpressionWithCodes, // this pass has to run before `rewrite-modules`
[babelPluginModules, {map: moduleMap}],
],
};
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"version": "15.1.0",
"devDependencies": {
"art": "^0.10.1",
"async": "^1.5.0",
"babel-cli": "^6.6.5",
"babel-core": "^6.0.0",
Expand All @@ -26,20 +27,23 @@
"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.8.0",
"browserify": "^13.0.0",
"bundle-collapser": "^1.1.1",
"coffee-script": "^1.8.0",
"core-js": "^2.2.1",
"coveralls": "^2.11.6",
"del": "^2.0.2",
"derequire": "^2.0.3",
"eslint": "1.10.3",
"eslint-plugin-react": "4.1.0",
"eslint-plugin-react-internal": "file:eslint-rules",
"fbjs": "^0.8.0",
"fbjs": "^0.8.1",
"fbjs-scripts": "^0.6.0",
"flow-bin": "^0.26.0",
"glob": "^6.0.1",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
Expand All @@ -51,19 +55,19 @@
"gulp-flatten": "^0.2.0",
"gulp-util": "^3.0.7",
"gzip-js": "~0.3.2",
"jest-cli": "^12.0.2",
"jest": "^12.1.1",
"loose-envify": "^1.1.0",
"object-assign": "^4.1.0",
"platform": "^1.1.0",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
"tmp": "~0.0.28",
"typescript": "~1.4.0",
"typescript": "~1.8.10",
"uglify-js": "^2.5.0",
"uglifyify": "^3.0.1"
},
"devEngines": {
"node": "4.x || 5.x",
"node": "4.x || 5.x || 6.x",
"npm": "2.x || 3.x"
},
"commonerConfig": {
Expand All @@ -86,7 +90,6 @@
"scriptPreprocessor": "scripts/jest/preprocessor.js",
"setupEnvScriptFile": "scripts/jest/environment.js",
"setupTestFrameworkScriptFile": "scripts/jest/test-framework-setup.js",
"testRunner": "jasmine1",
"testFileExtensions": [
"coffee",
"js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"node": ">=0.10.0"
},
"dependencies": {
"fbjs": "^0.8.0",
"fbjs": "^0.8.1",
"loose-envify": "^1.1.0",
"object-assign": "^4.1.0"
},
Expand Down
Loading