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

cable_ready

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cable_ready - npm Package Compare versions

Comparing version 5.0.0-pre3 to 5.0.0-pre4

.standard.yml

13

CHANGELOG.md
# Changelog
## [v5.0.0.pre3](https://github.com/stimulusreflex/cable_ready/tree/v5.0.0.pre3) (2021-08-22)
[Full Changelog](https://github.com/stimulusreflex/cable_ready/compare/v5.0.0.pre2...v5.0.0.pre3)
**Implemented enhancements:**
- redirect\_to operation [\#144](https://github.com/stimulusreflex/cable_ready/pull/144) ([leastbad](https://github.com/leastbad))
- RFC simplifed JSON payload + named batches [\#142](https://github.com/stimulusreflex/cable_ready/pull/142) ([leastbad](https://github.com/leastbad))
**Merged pull requests:**
- Bump path-parse from 1.0.6 to 1.0.7 [\#143](https://github.com/stimulusreflex/cable_ready/pull/143) ([dependabot[bot]](https://github.com/apps/dependabot))
## [v5.0.0.pre2](https://github.com/stimulusreflex/cable_ready/tree/v5.0.0.pre2) (2021-07-21)

@@ -4,0 +17,0 @@

export let consumer
const wait = () => new Promise(resolve => setTimeout(resolve))
const retryGetConsumer = async () => {
if (!consumer) {
await wait()
return retryGetConsumer()
} else {
return consumer
}
}
export default {
setConsumer (value) {
consumer = value
},
async getConsumer () {
return new Promise((resolve, reject) => {
consumer = retryGetConsumer()
resolve(consumer)
})
}
}

1

javascript/index.js

@@ -7,2 +7,3 @@ import * as MorphCallbacks from './morph_callbacks'

import './stream_from_element'
import './updates_for_element'

@@ -9,0 +10,0 @@ export { Utils, MorphCallbacks }

9

javascript/stream_from_element.js

@@ -1,7 +0,8 @@

import CableReady from 'cable_ready'
import { consumer } from './action_cable'
import CableReady from '.'
import actionCable from './action_cable'
class StreamFromElement extends HTMLElement {
connectedCallback () {
async connectedCallback () {
if (this.preview) return
const consumer = await actionCable.getConsumer()
if (consumer) {

@@ -21,3 +22,3 @@ this.channel = consumer.subscriptions.create(

console.error(
'The `stream_from` helper cannot connect without an ActionCable consumer.\nPlease run `rails generate cable_ready:stream_from` to fix this.'
'The `stream_from` helper cannot connect without an ActionCable consumer.\nPlease run `rails generate cable_ready:helpers` to fix this.'
)

@@ -24,0 +25,0 @@ }

@@ -104,2 +104,11 @@ import { inputTags, textInputTypes } from './enums'

// Boris de bouncer
function Boris (func, timeout) {
let timer
return (...args) => {
clearTimeout(timer)
timer = setTimeout(() => func.apply(this, args), timeout)
}
}
export {

@@ -114,3 +123,4 @@ isTextInput,

before,
after
after,
Boris
}
{
"name": "cable_ready",
"version": "5.0.0-pre3",
"version": "5.0.0-pre4",
"description": "CableReady helps you create great real-time user experiences by making it simple to trigger client-side DOM changes from server-side Ruby.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,4 +5,8 @@ <p align="center">

<p align="center">
<img src="https://img.shields.io/gem/v/cable_ready.svg?color=red" />
<img src="https://img.shields.io/npm/v/cable_ready.svg?color=blue" />
<a href="https://rubygems.org/gems/cable_ready">
<img src="https://img.shields.io/gem/v/cable_ready.svg?color=red" />
</a>
<a href="https://www.npmjs.com/package/cable_ready">
<img src="https://img.shields.io/npm/v/cable_ready.svg?color=blue" />
</a>
<a href="https://www.npmjs.com/package/cable_ready">

@@ -9,0 +13,0 @@ <img alt="downloads" src="https://img.shields.io/npm/dm/cable_ready.svg?color=blue" target="_blank" />

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