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

micro-dev

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-dev - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

27

lib/listening.js
// Native
const path = require('path')
const debounce = require('debounce')

@@ -79,3 +80,2 @@ // Packages

ignoreInitial: true,
cwd: process.cwd(),
ignored: [

@@ -106,17 +106,20 @@ /\.git|node_modules|\.nyc_output|\.sass-cache|coverage/,

// Ensure that the server gets restarted if a file changes
watcher.on('all', (event, filePath) => {
const location = path.relative(process.cwd(), filePath)
watcher.on(
'all',
debounce((event, filePath) => {
const location = path.relative(process.cwd(), filePath)
console.log(
`\n${chalk.blue('File changed:')} ${location} - Restarting server...`
)
console.log(
`\n${chalk.blue('File changed:')} ${location} - Restarting server...`
)
destroySockets(sockets)
destroySockets(sockets)
// Ensure the same port when restarting server
flags.port = details.port
// Ensure the same port when restarting server
flags.port = details.port
// Restart server
server.close(restartServer.bind(this, file, flags, watcher))
})
// Restart server
server.close(restartServer.bind(this, file, flags, watcher))
}, 10)
)
}

@@ -123,0 +126,0 @@

{
"name": "micro-dev",
"version": "1.2.1",
"version": "1.2.2",
"files": [

@@ -46,2 +46,3 @@ "bin",

"clipboardy": "1.1.4",
"debounce": "1.0.2",
"get-port": "3.1.0",

@@ -48,0 +49,0 @@ "ip": "1.1.5",

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