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

reload

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reload - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

17

CHANGELOG.md

@@ -0,1 +1,18 @@

3.0.2 / 2019-10-06
------------------
* Updated express sample app's body-parser from 1.18.3 to 1.19.0 - See: https://github.com/alallier/reload/pull/193
* Updated ws from ~6.2.1 to ~7.1.0 - See: https://github.com/alallier/reload/pull/194
* Updated nyc from 14.0.0 to 14.1.1 - See: https://github.com/alallier/reload/pull/195
* Updated serve-static from ~1.13.2 to ~1.14.0 - See: https://github.com/alallier/reload/pull/196
* Updated codecov from 3.3.0 to 3.6.1 - See: https://github.com/alallier/reload/pull/197
* Updated express in reload and sample from 4.16.4 to 4.17.1 - See: https://github.com/alallier/reload/pull/198
* Updated mocha from 6.1.4 to 6.2.1 - See: https://github.com/alallier/reload/pull/203
* Updated sinon from 7.3.2 to 7.5.0 - See: https://github.com/alallier/reload/pull/204
* Updated commander from ~2.20.0 to ~3.0.0 - See: https://github.com/alallier/reload/pull/205
* Updated standard from 12.0.1 to 14.3.1 - See: https://github.com/alallier/reload/pull/206
* Use package.json files instead of `.npmignore`. See: https://github.com/alallier/reload/pull/209
* Update CONTRIBUTING.md file for collaborators to ensure the sample app's reload version matches reload upstream. See: https://github.com/alallier/reload/pull/210
3.0.1 / 2019-04-20

@@ -2,0 +19,0 @@ ------------------

2

lib/reload-server.js

@@ -29,3 +29,3 @@ var http = require('http')

var serve = serveStatic(dir, { 'index': ['index.html', 'index.htm'] })
var serve = serveStatic(dir, { index: ['index.html', 'index.htm'] })

@@ -32,0 +32,0 @@ var server = http.createServer(function (req, res) {

@@ -32,3 +32,3 @@ // Requires

const socketPortSpecified = server ? null : port
let connections = {}
const connections = {}
let httpOrHttpsServer

@@ -100,3 +100,3 @@

let webSocketString = forceWss ? 'wss://$3' : 'ws$2://$3'
const webSocketString = forceWss ? 'wss://$3' : 'ws$2://$3'

@@ -108,4 +108,4 @@ reloadCode = reloadCode.replace('socketUrl.replace()', 'socketUrl.replace(/(^http(s?):\\/\\/)(.*:)(.*)/,' + (socketPortSpecified ? '\'' + webSocketString + socketPortSpecified : '\'' + webSocketString + '$4') + '\')')

function startWebSocketServer () {
let httpsOptions = {}
let WebSocketServer = ws.Server
const httpsOptions = {}
const WebSocketServer = ws.Server

@@ -212,3 +212,3 @@ return new Promise(function (resolve, reject) {

function mapConnections (conn) {
let key = conn.remoteAddress + ':' + conn.remotePort
const key = conn.remoteAddress + ':' + conn.remotePort
connections[key] = conn

@@ -223,5 +223,4 @@

function processRoute (route) {
let reloadJsMatch
// If reload.js is found in the route option strip it. We will concat it for user to ensure no case errors or order problems.
reloadJsMatch = route.match(/reload\.js/i)
const reloadJsMatch = route.match(/reload\.js/i)
if (reloadJsMatch) {

@@ -245,11 +244,11 @@ route = route.split(reloadJsMatch)[0]

function getReloadReturn () {
let tempObject = {
'reload': function () {
const tempObject = {
reload: function () {
sendMessage('reload')
},
'wss': wss,
'closeServer': function () {
wss: wss,
closeServer: function () {
return new Promise(function (resolve, reject) {
// Loop through all connections and terminate them for immediate server shutdown
for (let key in connections) {
for (const key in connections) {
connections[key].destroy()

@@ -282,3 +281,3 @@ }

}
let lastChar = testString.substring(testString.length - 1)
const lastChar = testString.substring(testString.length - 1)
// A file path string won't have an end of line character at the end

@@ -285,0 +284,0 @@ // Looking for either \n or \r allows for nearly any OS someone could

{
"name": "reload",
"version": "3.0.1",
"version": "3.0.2",
"files": [
"bin",
"lib",
"index.js"
],
"description": "Node.js module to refresh and reload your code in your browser when your code changes. No browser plugins required.",

@@ -23,18 +28,18 @@ "repository": {

"cli-color": "~1.4.0",
"commander": "~2.20.0",
"commander": "~3.0.0",
"finalhandler": "~1.1.1",
"minimist": "~1.2.0",
"open": "^6.1.0",
"serve-static": "~1.13.2",
"serve-static": "~1.14.0",
"supervisor": "~0.12.0",
"url-parse": "~1.4.4",
"ws": "~6.2.1"
"ws": "~7.1.0"
},
"devDependencies": {
"codecov": "3.3.0",
"sinon": "7.3.2",
"standard": "12.0.1",
"express": "4.16.4",
"mocha": "6.1.4",
"nyc": "14.0.0",
"codecov": "3.6.1",
"sinon": "7.5.0",
"standard": "14.3.1",
"express": "4.17.1",
"mocha": "6.2.1",
"nyc": "14.1.1",
"tree-kill": "1.2.1"

@@ -41,0 +46,0 @@ },

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