aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Add CHANGELOG entries for npm package renames [ci skip]Javan Makhmali2019-01-281-0/+6
|
* Add note about broadcast_to/broadcasting_for to change logVladimir Dementyev2019-01-221-0/+19
|
* Preparing for 6.0.0.beta1 releaseRafael Mendonça França2019-01-181-0/+2
|
* Add Action Cable Testing guidesVladimir Dementyev2019-01-141-0/+4
|
* Require Ruby 2.5 for Rails 6.Kasper Timm Hansen2018-12-191-2/+2
| | | | | | | | | | Generally followed the pattern for https://github.com/rails/rails/pull/32034 * Removes needless CI configs for 2.4 * Targets 2.5 in rubocop * Updates existing CHANGELOG entries for fewer merge conflicts * Removes Hash#slice extension as that's inlined on Ruby 2.5. * Removes the need for send on define_method in MethodCallAssertions.
* Stop trying to reconnect on unauthorized cable connectionsMick Staugaard2018-12-051-0/+5
|
* Add missing authorship to ActionCable changelog entryRichard Macklin2018-12-021-0/+2
| | | | | I accidentally forgot to add the author line to my changelog entry from 2bb4fdef5efc70327c018e982ff809a29ac6708b
* Replace reference to WebSocket global with ActionCable.adapters.WebSocketRichard Macklin2018-12-011-0/+4
| | | | | | | | | | The WebSocket dependency of ActionCable.Connection was made configurable in 66901c1849efae74c8a58fe0cb36afd487c067cc However, the reference here in Connection#getState was not updated to use the configurable property. This change remedies that and adds a test to verify it. Additionally, it backfills a test to ensure that Connection#open uses the configurable property.
* Remove circular dependency warnings in ActionCable javascript and publish ↵rmacklin2018-12-011-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source modules with fine-grained exports (#34370) * Replace several ActionCable.* references with finer-grained imports This reduces the number of circular dependencies among the module imports from 4: ``` (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection_monitor.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/consumer.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/subscriptions.js -> app/javascript/action_cable/index.js ``` to 2: ``` (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/index.js (!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/connection_monitor.js -> app/javascript/action_cable/index.js ``` * Remove tests that only test javascript object property assignment These tests really only assert that you can assign a property to the ActionCable global object. That's true for pretty much any object in javascript (it would only be false if the object has been frozen, or has explicitly set some properties to be nonconfigurable). * Refactor ActionCable to provide individual named exports By providing individual named exports rather than a default export which is an object with all of those properties, we enable applications to only import the functions they need: any unused functions will be removed via tree shaking. Additionally, this restructuring removes the remaining circular dependencies by extracting the separate adapters and logger modules, so there are now no warnings when compiling the ActionCable bundle. Note: This produces two small breaking API changes: - The `ActionCable.WebSocket` getter and setter would be moved to `ActionCable.adapters.WebSocket`. If a user is currently configuring this, when upgrading they'd need to either add a delegated getter/setter themselves, or change it like this: ```diff - ActionCable.WebSocket = MyWebSocket + ActionCable.adapters.WebSocket = MyWebSocket ``` Applications which don't change the WebSocket adapter would not need any changes for this when upgrading. - Similarly, the `ActionCable.logger` getter and setter would be moved to `ActionCable.adapters.logger`. If a user is currently configuring this, when upgrading they'd need to either add a delegated getter/setter themselves, or change it like this: ```diff - ActionCable.logger = myLogger + ActionCable.adapters.logger = myLogger ``` Applications which don't change the logger would not need any changes for this when upgrading. These two aspects of the public API have to change because there's no way to export a property setter for `WebSocket` (or `logger`) such that this: ```js import ActionCable from "actioncable" ActionCable.WebSocket = MyWebSocket ``` would actually update `adapters.WebSocket`. (We can only offer that if we have two separate source files like if `index.js` uses `import * as ActionCable from "./action_cable" and then exports a wrapper which has delegated getters and setters for those properties.) This API change is very minor - it should be easy for applications to add the `adapters.` prefix in their assignments or to patch in delegated setters. And especially because most applications in the wild are not ever changing the default value of `ActionCable.WebSocket` or `ActionCable.logger` (because the default values are perfect), this API breakage is worth the tree-shaking benefits we gain. * Include source code in published actioncable npm package This allows actioncable users to ship smaller javascript bundles to visitors using modern browsers, as demonstrated in this repository: https://github.com/rmacklin/actioncable-es2015-build-example In that example, the bundle shrinks by 2.8K (25.2%) when you simply change the actioncable import to point to the untranspiled src. If you go a step further, like this: ``` diff --git a/app/scripts/main.js b/app/scripts/main.js index 17bc031..1a2b2e0 100644 --- a/app/scripts/main.js +++ b/app/scripts/main.js @@ -1,6 +1,6 @@ -import ActionCable from 'actioncable'; +import * as ActionCable from 'actioncable'; let cable = ActionCable.createConsumer('wss://cable.example.com'); cable.subscriptions.create('AppearanceChannel', { ``` then the bundle shrinks by 3.6K (31.7%)! In addition to allowing smaller bundles for those who ship untranspiled code to modern browsers, including the source code in the published package can be useful in other ways: 1. Users can import individual modules rather than the whole library 2. As a result of (1), users can also monkey patch parts of actioncable by importing the relevant module, modifying the exported object, and then importing the rest of actioncable (which would then use the patched object). Note: This is the same enhancement that we made to activestorage in c0368ad090b79c19300a4aa133bb188b2d9ab611 * Remove unused commonjs & resolve plugins from ActionCable rollup config These were added when we copied the rollup config from ActiveStorage, but ActionCable does not have any commonjs dependencies (it doesn't have any external dependencies at all), so these plugins are unnecessary here * Change ActionCable.startDebugging() -> ActionCable.logger.enabled=true and ActionCable.stopDebugging() -> ActionCable.logger.enabled=false This API is simpler and more clearly describes what it does * Change Travis configuration to run yarn install at the root for ActionCable builds This is necessary now that the repository is using Yarn Workspaces
* ActionCable: add id option to redis adapter configIlia Kasianenko2018-09-051-0/+18
|
* Remove changelog header for unreleased versionRafael Mendonça França2018-03-131-2/+0
| | | | | | We only add the header when releasing to avoid some conflicts. [ci skip]
* Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-0/+5
| | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-301-32/+1
| | | | :tada::tada::tada:
* Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-281-0/+5
|
* Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-271-0/+2
|
* Remove CHANGELOG entry that was backported to Rails 5.1.3. [ci skip] (#30986)प्रथमेश Sonpatki2017-10-251-7/+0
| | | - Backport commit: https://github.com/rails/rails/commit/7122a2cdc3634e170129f8b6cabd1e8fbed13c3d
* Removed deprected evented redis adapterRafael Mendonça França2017-10-231-0/+4
|
* redis-rb 4.0 supportJeremy Daer2017-10-081-0/+4
| | | | | | | | * Use `gem 'redis', '~> 4.0'` for new app Gemfiles * Loosen Action Cable redis-rb dep to `>= 3.3, < 5` * Bump redis-namespace for looser Redis version dep * Avoid using the underlying `redis.client` directly * Use `Redis.new` instead of `Redis.connect`
* Lint actioncable/CHANGELOG.mdJon Moss2017-08-061-3/+3
| | | | | | | Postgres --> PostgreSQL ActionCable --> Action Cable [ci skip]
* [Fix #28751] Hash stream long stream identifiers when using Postgres adapterpalkan2017-07-061-0/+9
|
* Adds CHANGELOG for f55ecc6 [ci skip]Marc Rendl Ignacio2017-06-271-0/+9
|
* Cleanup CHANGELOGs [ci skip]Ryuta Kamizono2017-04-301-1/+2
| | | | | | * Remove trailing spaces. * Add backticks around method and command. * Fix indentation.
* Log any errors originating from the socketedwardmp2017-04-161-0/+6
|
* Start Rails 5.2 developmentMatthew Draper2017-03-221-45/+1
|
* Preparing for 5.1.0.beta1 releaseRafael Mendonça França2017-02-231-0/+2
|
* Add changelog entry for #27425 [ci skip]Chad Ingram2017-01-211-0/+6
|
* Small edits to actioncable/CHANGELOG.mdJon Moss2016-12-271-2/+2
| | | | | | [ci skip] - capitalize WebSocket
* Changelog editsVipul A M2016-11-121-4/+4
|
* Permit same-origin connections by defaultMatthew Draper2016-10-111-0/+7
| | | | | | | | | | | | | | | | | WebSocket always defers the decision to the server, because it didn't have to deal with legacy compatibility... but the same-origin policy is still a reasonable default. Origin checks do not protect against a directly connecting attacker -- they can lie about their host, but can also lie about their origin. Origin checks protect against a connection from 3rd-party controlled script in a context where a victim browser's cookies will be passed along. And if an attacker has breached that protection, they've already compromised the HTTP session, so treating the WebSocket connection in the same way seems reasonable. In case this logic proves incorrect (or anyone just wants to be more paranoid), we retain a config option to disable it.
* Merge pull request #26547 from ↵Matthew Draper2016-10-011-0/+8
|\ | | | | | | | | | | palkan/fix/actioncable-confirmation-race-condition Avoid race condition on subscription confirmation
* | Buffer writes to the cable socketsMatthew Draper2016-09-281-0/+5
|/ | | | | Otherwise, they can sometimes block, leading to reduced system throughput.
* Pass over changelogs [ci skip]Vipul A M2016-08-101-1/+1
|
* Correct changelog layoutMatthew Draper2016-07-091-8/+8
| | | | [ci skip]
* Insert changelog entry for #25615Matthew Draper2016-07-091-0/+7
|
* Merge pull request #25624 from tinco/actioncable_write_raceMatthew Draper2016-07-091-0/+5
|\ | | | | | | Fix race condition in websocket stream write
* | Add ActiveSupport::Notifications hook to Broadcaster#broadcastMatthew Wear2016-05-121-0/+3
|/ | | | | This addition of this notification hook will give users better visibility into the messages being sent over the PubSub adapter.
* Start Rails 5.1 development :tada:Rafael Mendonça França2016-05-101-87/+1
|
* Preparing for 5.0.0.rc1 releaseRafael Mendonça França2016-05-061-0/+5
|
* Prep Rails 5 beta 4eileencodes2016-04-271-0/+2
|
* Merge pull request #24224 from danielrhodes/actioncable-websocket-protocolsJeremy Daer2016-04-051-0/+20
|\ | | | | | | ActionCable protocol negotiation
* | Cable message encodingJeremy Daer2016-03-311-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce a connection coder responsible for encoding Cable messages as WebSocket messages, defaulting to `ActiveSupport::JSON` and duck- typing to any object responding to `#encode` and `#decode`. * Consolidate encoding responsibility to the connection. No longer explicitly JSON-encode from channels or other sources. Pass Cable messages as Hashes to `#transmit` and rely on it to encode. * Introduce stream encoders responsible for decoding pubsub messages. Preserve the currently raw encoding, but make it easy to use JSON. Same duck type as the connection encoder. * Revert recent data normalization/quoting (#23649) which treated `identifier` and `data` values as nested JSON objects rather than as opaque JSON-encoded strings. That dealt us an awkward hand where we'd decode JSON strings… or not, but always encode as JSON. Embedding JSON object values directly is preferably, no extra JSON encoding, but that should be a purposeful protocol version change rather than ambiguously, inadvertently supporting multiple message formats.
* | Fix CHANGELOG entry [ci skip]Rafael Mendonça França2016-03-301-1/+1
| |
* | Add AS::Notifications and LogSubscriber to ActionCable::ChannelMatthew Wear2016-03-041-0/+4
|/ | | | | This commit adds ActiveSupport::Notifications instrumentation hooks and a LogSuscriber to ActionCable::Channel::Base.
* Fix CHANGELOG spacing [ci skip]Jeremy Daer2016-03-021-12/+12
|
* Accept JSON with no backslashes/escapingJon Moss2016-03-021-0/+5
| | | | | | | Fixes #22675 Allow channel identifiers and also data with no backslahes/escaping to be accepted by the subscription storer.
* Use AS::Executor / AS::Reloader to support reloading in ActionCableMatthew Draper2016-03-021-0/+5
|
* Update changelogJay Hayes2016-02-241-0/+4
|
* Add Ruby formatting to CHANGELOG entryclaudiob2016-02-241-4/+5
| | | | [ci skip]
* Preparing for 5.0.0.beta3 releaseeileencodes2016-02-241-0/+2
| | | | Adds changelog headers for beta3 release
* Allow for non-standard redis connectorsDavid Heinemeier Hansson2016-02-041-0/+7
|