Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-on-rails

Package Overview
Dependencies
Maintainers
1
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-on-rails - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

node_package/lib/scriptSanitizedVal.js

9

CHANGELOG.md

@@ -7,2 +7,8 @@ # Change Log

## [5.1.1] - 2016-04-04
##### Fixed
- [Security] Address failure to sanitize console messages when server rendering and displaying in the browser console. See [#366](https://github.com/shakacode/react_on_rails/pull/366) and [#370](https://github.com/shakacode/react_on_rails/pull/370) by [justin808](https://github.com/justin808)
##### Added
- railsContext includes the port number and a boolean if the code is being run on the server or client.
## [5.1.0] - 2016-04-03

@@ -266,3 +272,4 @@ ##### Added

- Fix several generator related issues.
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/5.1.0...master
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/5.1.1...master
[5.1.1]: https://github.com/shakacode/react_on_rails/compare/5.0.0...5.1.1
[5.1.0]: https://github.com/shakacode/react_on_rails/compare/5.0.0...5.1.0

@@ -269,0 +276,0 @@ [5.0.0]: https://github.com/shakacode/react_on_rails/compare/4.0.3...5.0.0

@@ -18,2 +18,6 @@ 'use strict';

var _scriptSanitizedVal = require('./scriptSanitizedVal');
var _scriptSanitizedVal2 = _interopRequireDefault(_scriptSanitizedVal);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -30,7 +34,10 @@

var stringifiedList = msg.arguments.map(function (arg) {
var val = void 0;
try {
return typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify2.default)(arg);
val = typeof arg === 'string' || arg instanceof String ? arg : (0, _stringify2.default)(arg);
} catch (e) {
return e.message + ': ' + arg;
val = e.message + ': ' + arg;
}
return (0, _scriptSanitizedVal2.default)(val);
});

@@ -37,0 +44,0 @@

@@ -38,3 +38,7 @@ 'use strict';

if (trace) {
console.log('RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with props, railsContext:', props, railsContext);
if (railsContext && railsContext.serverSide) {
console.log('RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with railsContext:', railsContext);
} else {
console.log('RENDERED ' + name + ' to dom node with id: ' + domNodeId + ' with props, railsContext:', props, railsContext);
}
}

@@ -41,0 +45,0 @@

2

package.json
{
"name": "react-on-rails",
"version": "5.1.0",
"version": "5.1.1",
"description": "react-on-rails JavaScript for react_on_rails Ruby gem",

@@ -5,0 +5,0 @@ "main": "node_package/lib/ReactOnRails.js",

[![Build Status](https://travis-ci.org/shakacode/react_on_rails.svg?branch=master)](https://travis-ci.org/shakacode/react_on_rails) [![Dependency Status](https://gemnasium.com/shakacode/react_on_rails.svg)](https://gemnasium.com/shakacode/react_on_rails) [![Gem Version](https://badge.fury.io/rb/react_on_rails.svg)](https://badge.fury.io/rb/react_on_rails) [![npm version](https://badge.fury.io/js/react-on-rails.svg)](https://badge.fury.io/js/react-on-rails) [![Code Climate](https://codeclimate.com/github/shakacode/react_on_rails/badges/gpa.svg)](https://codeclimate.com/github/shakacode/react_on_rails) [![Coverage Status](https://coveralls.io/repos/shakacode/react_on_rails/badge.svg?branch=master&service=github)](https://coveralls.io/github/shakacode/react_on_rails?branch=master)
# NEWS
* 5.1.0 has shipped!Please see the [CHANGELOG.md](./CHANGELOG.md) for details on the latest release and any breaking changes.
* 5.1.1 has shipped! Please see the [CHANGELOG.md](./CHANGELOG.md) for details on the latest release and any breaking changes.
* [New slides on React on Rails](http://www.slideshare.net/justingordon/react-on-rails-v4032).

@@ -132,3 +132,3 @@ * 2016-02-28: We added a [Projects page](./PROJECTS.md) and a [Kudos page](./KUDOS.md). Please edit the page your project or [email us](mailto:contact@shakacode.com) and we'll add you. We also love stars as it helps us attract new users and contributors.

```ruby
gem "react_on_rails", "~> 4"
gem "react_on_rails", "~> 5"
```

@@ -238,2 +238,3 @@

host: uri.host, # foo.com
port: uri.port,
pathname: uri.path, # /posts

@@ -245,3 +246,8 @@ search: uri.query, # id=30&limit=5

i18nDefaultLocale: I18n.default_locale,
httpAcceptLanguage: request.env["HTTP_ACCEPT_LANGUAGE"]
httpAcceptLanguage: request.env["HTTP_ACCEPT_LANGUAGE"],
# Other
serverSide: boolean # Are we being called on the server or client? NOTE, if you conditionally
# render something different on the server than the client, then React will only show the
# server version!
}

@@ -333,3 +339,3 @@ ```

+ **html_options:** Any other html options to get placed on the added div for the component.
+ **trace:** set to true to print additional debugging information in the browser. Defaults to true for development, off otherwise.
+ **trace:** set to true to print additional debugging information in the browser. Defaults to true for development, off otherwise. Note, on the client you will so both the railsContext and your props. On the server, you only see the railsContext being logged.
+ **replay_console:** Default is true. False will disable echoing server-rendering logs to the browser. While this can make troubleshooting server rendering difficult, so long as you have the default configuration of logging_on_server set to true, you'll still see the errors on the server.

@@ -336,0 +342,0 @@ + **raise_on_prerender_error:** Default is false. True will throw an error on the server side rendering. Your controller will have to handle the error.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc