Skip to content

Commit dbf6fd2

Browse files
committed
v0.12.1
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
1 parent d216fa4 commit dbf6fd2

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed

CHANGES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 0.12.1 / 2015-03-11
2+
3+
## Bug Fixes
4+
5+
* Changed method of detecting if we're running in the browser to avoid false
6+
positives when browserify/webpack insert `process` shims into browser bundles.
7+
8+
A false positive can result in an `Error` being thrown when validating a
9+
client-side `FormSet` ([#75](https://github.com/insin/newforms/issues/75))
10+
111
# 0.12.0 / 2015-03-11
212

313
## Breaking Changes

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# newforms [![travis status](https://secure.travis-ci.org/insin/newforms.png)](http://travis-ci.org/insin/newforms)
22

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

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

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

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

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

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

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

dist/newforms.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* newforms 0.12.0 - https://github.com/insin/newforms
2+
* newforms 0.12.1 - https://github.com/insin/newforms
33
* MIT Licensed
44
*/
55
(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){
@@ -6836,7 +6836,7 @@ module.exports = {
68366836
'use strict';
68376837

68386838
module.exports = {
6839-
browser: typeof process == 'undefined'
6839+
browser: typeof window != 'undefined'
68406840
}
68416841
},{}],75:[function(require,module,exports){
68426842
'use strict';

dist/newforms.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
# built documents.
5252
#
5353
# The short X.Y version.
54-
version = '0.12.0'
54+
version = '0.12.1'
5555
# The full version, including alpha/beta/rc tags.
56-
release = '0.12.0'
56+
release = '0.12.1'
5757

5858
# The language for content autogenerated by Sphinx. Refer to documentation
5959
# for a list of supported languages.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "newforms",
33
"description": "An isomorphic form-handling library for React",
4-
"version": "0.12.0",
4+
"version": "0.12.1",
55
"author": "Jonny Buchanan <[email protected]>",
66
"keywords": [
77
"isomorphic",
@@ -50,7 +50,7 @@
5050
"react": ">=0.13.0"
5151
},
5252
"scripts": {
53-
"bundle": "gulp browserify-js --production --release && gulp browserify-js --development --release",
53+
"dist": "gulp browserify-js --production --release && gulp browserify-js --development --release",
5454
"npm": "gulp npm",
5555
"test": "gulp browserify-js && node tests/tests.js",
5656
"watch": "gulp"

src/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
browser: typeof process == 'undefined'
4+
browser: typeof window != 'undefined'
55
}

0 commit comments

Comments
 (0)