app/assets/javascripts/stimulus_reflex.js in stimulus_reflex-3.5.0.rc1 vs app/assets/javascripts/stimulus_reflex.js in stimulus_reflex-3.5.0.rc2

- old
+ new

@@ -606,12 +606,19 @@ } } const received = data => { if (!data.cableReady) return; - if (data.version.replace(".pre", "-pre") !== CableReady.version) { - if (Debug$1.enabled) console.error(`Reflex failed due to cable_ready gem/NPM package version mismatch. Package versions must match exactly.\nNote that if you are using pre-release builds, gems use the "x.y.z.preN" version format, while NPM packages use "x.y.z-preN".\n\ncable_ready gem: ${data.version}\ncable_ready NPM: ${CableReady.version}`); + if (data.version.replace(".pre", "-pre").replace(".rc", "-rc") !== CableReady.version) { + const mismatch = `CableReady failed to execute your reflex action due to a version mismatch between your gem and JavaScript version. Package versions must match exactly.\n\ncable_ready gem: ${data.version}\ncable_ready npm: ${CableReady.version}`; + console.error(mismatch); + if (Debug$1.enabled) { + CableReady.operations.stimulusReflexVersionMismatch({ + text: mismatch, + level: "error" + }); + } return; } let reflexOperations = []; for (let i = data.operations.length - 1; i >= 0; i--) { if (data.operations[i].stimulusReflex) { @@ -936,11 +943,11 @@ return attrs; }; var name = "stimulus_reflex"; -var version = "3.5.0-rc1"; +var version = "3.5.0-rc2"; var description = "Build reactive applications with the Rails tooling you already know and love."; var keywords = [ "ruby", "rails", "websockets", "actioncable", "turbolinks", "reactive", "cable", "ujs", "ssr", "stimulus", "reflex", "stimulus_reflex", "dom", "morphdom" ]; @@ -986,10 +993,10 @@ }; var dependencies = { "@hotwired/stimulus": "^3", "@rails/actioncable": "^6 || ^7", - cable_ready: "5.0.0-rc1" + cable_ready: "5.0.0-rc2" }; var devDependencies = { "@open-wc/testing": "^3.1.7", "@rollup/plugin-json": "^6.0.0",