New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stimulus_reflex

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stimulus_reflex - npm Package Compare versions

Comparing version 3.5.0-rc2 to 3.5.0-rc3

6

dist/stimulus_reflex.js

@@ -948,3 +948,3 @@ import { Controller } from "@hotwired/stimulus";

var version = "3.5.0-rc2";
var version = "3.5.0-rc3";

@@ -999,3 +999,3 @@ var description = "Build reactive applications with the Rails tooling you already know and love.";

"@rails/actioncable": "^6 || ^7",
cable_ready: "5.0.0-rc2"
cable_ready: "^5.0.0"
};

@@ -1014,3 +1014,3 @@

"toastify-js": "^1.12.0",
vitepress: "^1.0.0-alpha.56"
vitepress: "^1.0.0-beta.1"
};

@@ -1017,0 +1017,0 @@

@@ -872,3 +872,3 @@ (function(global, factory) {

var name = "stimulus_reflex";
var version = "3.5.0-rc2";
var version = "3.5.0-rc3";
var description = "Build reactive applications with the Rails tooling you already know and love.";

@@ -906,3 +906,3 @@ var keywords = [ "ruby", "rails", "websockets", "actioncable", "turbolinks", "reactive", "cable", "ujs", "ssr", "stimulus", "reflex", "stimulus_reflex", "dom", "morphdom" ];

"@rails/actioncable": "^6 || ^7",
cable_ready: "5.0.0-rc2"
cable_ready: "^5.0.0"
};

@@ -920,3 +920,3 @@ var devDependencies = {

"toastify-js": "^1.12.0",
vitepress: "^1.0.0-alpha.56"
vitepress: "^1.0.0-beta.1"
};

@@ -923,0 +923,0 @@ var packageInfo = {

@@ -275,2 +275,52 @@ import { html, fixture, assert } from '@open-wc/testing'

})
it('should use stimulus-reflex controller if matching controller is not a registered Stimulus controller using the data-reflex attribute shorthand', async () => {
const element = await fixture(html`
<a data-reflex="click" data-controller="doesnt-exist">
Click
</a>
`)
scanForReflexesOnElement(element)
assert.equal(element.dataset.reflex, 'click')
assert.equal(element.dataset.action, 'click->stimulus-reflex#__perform')
assert.equal(element.dataset.controller, 'doesnt-exist stimulus-reflex')
})
it('should use stimulus-reflex controller if matching controller is a Stimulus controller but using the data-reflex attribute shorthand', async () => {
App.app.register('example', ExampleController)
const element = await fixture(html`
<a data-reflex="click" data-controller="example">
Click
</a>
`)
scanForReflexesOnElement(element)
assert.equal(element.dataset.reflex, 'click')
assert.equal(element.dataset.action, 'click->stimulus-reflex#__perform')
assert.equal(element.dataset.controller, 'example stimulus-reflex')
})
// https://github.com/stimulusreflex/stimulus_reflex/issues/659
it('should not add stimulus-reflex controller if parent element already has a StimulusReflex registered controller', async () => {
App.app.register('example', ExampleController)
const controllerElement = await fixture(html`
<div data-controller="example">
<a href="#" data-reflex="click->Example#call">Eat</a>
</div>
`)
const button = controllerElement.querySelector('a')
scanForReflexesOnElement(button)
assert.equal(controllerElement.dataset.controller, 'example')
assert.equal(button.dataset.reflex, 'click->Example#call')
assert.equal(button.dataset.action, 'click->example#__perform')
assert.equal(button.dataset.controller, undefined)
})
})
{
"name": "stimulus_reflex",
"version": "3.5.0-rc2",
"version": "3.5.0-rc3",
"description": "Build reactive applications with the Rails tooling you already know and love.",

@@ -60,3 +60,3 @@ "keywords": [

"@rails/actioncable": "^6 || ^7",
"cable_ready": "5.0.0-rc2"
"cable_ready": "^5.0.0"
},

@@ -74,4 +74,4 @@ "devDependencies": {

"toastify-js": "^1.12.0",
"vitepress": "^1.0.0-alpha.56"
"vitepress": "^1.0.0-beta.1"
}
}
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