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

vite-plugin-stimulus-hmr

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-stimulus-hmr - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

14

dist/index.js

@@ -5,14 +5,12 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/index.ts

var debug = _debug2.default.call(void 0, "stimulus:hmr");
function isSSR(options) {
return typeof options === "object" ? options.ssr : options;
}
function StimulusHMRPlugin({appGlobal = "$$StimulusApp$$"} = {}) {
let shouldSkip = false;
return {
name: "stimulus:hmr",
configResolved(config) {
shouldSkip = config.command === "build" || config.isProduction;
},
transform(code, id, ssr) {
if (shouldSkip || ssr)
apply: "serve",
transform(code, id, options) {
if (isSSR(options) || id.includes("node_modules"))
return;
if (id.includes("node_modules"))
return;
const appRegex = /\n[^\n]*?\s(\w+)(?:\s*=\s*Application\.start\(\))/;

@@ -19,0 +17,0 @@ const appVariable = (code.match(appRegex) || [])[1];

{
"name": "vite-plugin-stimulus-hmr",
"description": "HMR for Stimulus controllers in Vite.js, tweak your JS without refreshing the page.",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index.js",

@@ -39,7 +39,8 @@ "module": "dist/index.mjs",

"release": "nr clean && nr build && npm publish",
"postpublish" : "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags"
"prepublishOnly": "npm run build",
"postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags"
},
"dependencies": {
"debug": "^4.3.1",
"stimulus-vite-helpers": "^1.0"
"stimulus-vite-helpers": "^1.0.4"
},

@@ -57,4 +58,4 @@ "devDependencies": {

"typescript": "^4.1.3",
"vite": "^2.0.0-beta.69"
"vite": "^2.6.0"
}
}

Sorry, the diff of this file is not supported yet

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