Skip to content

Commit

Permalink
v0.12.1
Browse files Browse the repository at this point in the history
Change browser detection check

Check for window rather than process, as browserify/webpack may shim process when bundling for the browser, depending on how they're configured

Fixes #75
  • Loading branch information
insin committed Mar 12, 2015
1 parent d216fa4 commit dbf6fd2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 0.12.1 / 2015-03-11

## Bug Fixes

* Changed method of detecting if we're running in the browser to avoid false
positives when browserify/webpack insert `process` shims into browser bundles.

A false positive can result in an `Error` being thrown when validating a
client-side `FormSet` ([#75](https://github.com/insin/newforms/issues/75))

# 0.12.0 / 2015-03-11

## Breaking Changes
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# newforms [![travis status](https://secure.travis-ci.org/insin/newforms.png)](http://travis-ci.org/insin/newforms)

An isomorphic JavaScript form-handling library for [React](http://facebook.github.io/react/).
An isomorphic form-handling library for [React](http://facebook.github.io/react/).

(Formerly a direct port of the [Django](http://www.djangoproject.com) framework's `django.forms` library)

Expand Down Expand Up @@ -33,11 +33,11 @@ find global `React` variable to work with.
The uncompressed bundle is in development mode, so will log warnings about
potential mistakes.

You can find it in the [/dist directory](https://github.com/insin/newforms/tree/v0.12.0/dist).
You can find it in the [/dist directory](https://github.com/insin/newforms/tree/v0.12.1/dist).

## [Upgrade Guide](https://github.com/insin/newforms/blob/react/UPGRADE_GUIDE.md#0120)

## [Documentation @ ReadTheDocs](http://newforms.readthedocs.org/en/v0.12.0/)
## [Documentation @ ReadTheDocs](http://newforms.readthedocs.org/en/v0.12.1/)

## [Newforms Examples @ GitHub](https://github.com/insin/newforms-examples)

Expand Down
4 changes: 2 additions & 2 deletions dist/newforms.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* newforms 0.12.0 - https://github.com/insin/newforms
* newforms 0.12.1 - https://github.com/insin/newforms
* MIT Licensed
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.forms = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
Expand Down Expand Up @@ -6836,7 +6836,7 @@ module.exports = {
'use strict';

module.exports = {
browser: typeof process == 'undefined'
browser: typeof window != 'undefined'
}
},{}],75:[function(require,module,exports){
'use strict';
Expand Down
4 changes: 2 additions & 2 deletions dist/newforms.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
# built documents.
#
# The short X.Y version.
version = '0.12.0'
version = '0.12.1'
# The full version, including alpha/beta/rc tags.
release = '0.12.0'
release = '0.12.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "newforms",
"description": "An isomorphic form-handling library for React",
"version": "0.12.0",
"version": "0.12.1",
"author": "Jonny Buchanan <[email protected]>",
"keywords": [
"isomorphic",
Expand Down Expand Up @@ -50,7 +50,7 @@
"react": ">=0.13.0"
},
"scripts": {
"bundle": "gulp browserify-js --production --release && gulp browserify-js --development --release",
"dist": "gulp browserify-js --production --release && gulp browserify-js --development --release",
"npm": "gulp npm",
"test": "gulp browserify-js && node tests/tests.js",
"watch": "gulp"
Expand Down
2 changes: 1 addition & 1 deletion src/env.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
browser: typeof process == 'undefined'
browser: typeof window != 'undefined'
}

0 comments on commit dbf6fd2

Please sign in to comment.