Skip to content

0.11.2 stuff #2198

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

Merged
merged 4 commits into from
Sep 16, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 0.11.2 (September 16, 2014)

### React Core

#### New Features

* Added support for `<dialog>` element and associated `open` attribute
* Added support for `<picture>` element and associated `media` and `sizes` attributes
* Added `React.createElement` API in preparation for React v0.12
* `React.createDescriptor` has been deprecated as a result

### JSX

* `<picture>` is now parsed into `React.DOM.picture`

### React Tools

* Update `esprima` and `jstransform` for correctness fixes
* The `jsx` executable now exposes a `--strip-types` flag which can be used to remove TypeScript-like type annotations
* This option is also exposed to `require('react-tools').transform` as `stripTypes`

## 0.11.1 (July 24, 2014)

### React Core
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ The fastest way to get started is to serve JavaScript from the CDN (also availab

```html
<!-- The core React library -->
<script src="http://fb.me/react-0.11.1.js"></script>
<script src="http://fb.me/react-0.11.2.js"></script>
<!-- In-browser JSX transformer, remove when pre-compiling JSX. -->
<script src="http://fb.me/JSXTransformer-0.11.1.js"></script>
<script src="http://fb.me/JSXTransformer-0.11.2.js"></script>
```

We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.11.1.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.11.2.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.

If you'd like to use [bower](http://bower.io), it's as easy as:

Expand Down
6 changes: 5 additions & 1 deletion bin/jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ require('commoner').version(
}).option(
'--harmony',
'Turns on JS transformations such as ES6 Classes etc.'
).option(
'--strip-types',
'Strips out type annotations.'
).option(
'--source-map-inline',
'Embed inline sourcemap in transformed source'
).process(function(id, source) {
// This is where JSX, ES6, etc. desugaring happens.
var options = {
harmony: this.options.harmony,
sourceMap: this.options.sourceMapInline
sourceMap: this.options.sourceMapInline,
stripTypes: this.options.stripTypes
};
return transform(source, options);
});
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ sass:
sass_dir: _css
gems:
- jekyll-redirect-from
react_version: 0.11.1
react_version: 0.11.2
46 changes: 46 additions & 0 deletions docs/_posts/2014-09-16-react-v0.11.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: React v0.11.2
author: Paul O’Shannessy
---

Today we're releasing React v0.11.2 to add a few small features.

We're adding support for two more DOM elements, `<dialog>` and `<picture>`, as well as the associated attributes needed to use these elements: `open`, `media`, and `sizes`. While not all browsers support these natively, some of our cutting edge users want to make use of them, so we're making them available to everybody.

We're also doing some work to prepare for v0.12 and improve compatibility between the versions. To do this we are replacing `React.createDescriptor` with `React.createElement`. `createDescriptor` will continue to work with a warning and will be gone in v0.12. Chances are that this won't affect anybody.

And lastly, on the heels of announcing Flow at [@Scale](http://atscaleconference.com/) yesterday, we're adding the ability to strip TypeScript-like type annotations as part of the `jsx` transform. To use, simply use the `--strip-types` flag on the command line, or set `stripTypes` in the `options` object when calling the API. We'll be talking about Flow more in the coming months. But for now, it's helpful to know that it is a flow-sensitive JavaScript type checker we will be open sourcing soon.

The release is available for download from the CDN:

* **React**
Dev build with warnings: <http://fb.me/react-0.11.2.js>
Minified build for production: <http://fb.me/react-0.11.2.min.js>
* **React with Add-Ons**
Dev build with warnings: <http://fb.me/react-with-addons-0.11.2.js>
Minified build for production: <http://fb.me/react-with-addons-0.11.2.min.js>
* **In-Browser JSX transformer**
<http://fb.me/JSXTransformer-0.11.2.js>

We've also published version `0.11.2` of the `react` and `react-tools` packages on npm and the `react` package on bower.

Please try these builds out and [file an issue on GitHub](https://github.com/facebook/react/issues/new) if you see anything awry.

### React Core

#### New Features

* Added support for `<dialog>` element and associated `open` attribute
* Added support for `<picture>` element and associated `media` and `sizes` attributes
* Added `React.createElement` API in preparation for React v0.12
* `React.createDescriptor` has been deprecated as a result

### JSX

* `<picture>` is now parsed into `React.DOM.picture`

### React Tools

* Update `esprima` and `jstransform` for correctness fixes
* The `jsx` executable now exposes a `--strip-types` flag which can be used to remove TypeScript-like type annotations
* This option is also exposed to `require('react-tools').transform` as `stripTypes`
Binary file added docs/downloads/react-0.11.2.zip
Binary file not shown.
17 changes: 9 additions & 8 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ module.exports = {

function innerTransform(input, options) {
options = options || {};
var visitorList = getVisitors(options.harmony);
return transform(visitorList, input, options);
}

function getVisitors(harmony) {
if (harmony) {
return visitors.getAllVisitors();
} else {
return visitors.transformVisitors.react;
var visitorSets = ['react'];
if (options.harmony) {
visitorSets.push('harmony');
}
if (options.stripTypes) {
visitorSets.push('type-annotations');
}

var visitorList = visitors.getVisitorsBySet(visitorSets);
return transform(visitorList, input, options);
}

function inlineSourceMap(sourceMap, sourceCode, sourceFilename) {
Expand Down
2 changes: 1 addition & 1 deletion npm-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react",
"description": "React is a JavaScript library for building user interfaces.",
"version": "0.11.1",
"version": "0.11.2",
"keywords": [
"react"
],
Expand Down
56 changes: 28 additions & 28 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-tools",
"description": "A set of complementary tools to React, including the JSX transformer.",
"version": "0.11.1",
"version": "0.11.2",
"keywords": [
"react",
"jsx",
Expand Down
2 changes: 1 addition & 1 deletion src/browser/ui/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ if (__DEV__) {

// Version exists only in the open-source version of React, not in Facebook's
// internal version.
React.version = '0.11.1';
React.version = '0.11.2';

module.exports = React;
Loading