Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-watch

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-watch - npm Package Compare versions

Comparing version 7.0.0 to 7.1.0

ip-ranges.json

32

babel-watch.js

@@ -10,3 +10,2 @@ #!/usr/bin/env node

const os = require('os');
const util = require('util');
const fork = require('child_process').fork;

@@ -17,3 +16,2 @@ const execSync = require('child_process').execSync;

const isString = require('lodash.isstring');
const isArray = require('lodash.isarray');
const isRegExp = require('lodash.isregexp');

@@ -35,3 +33,3 @@

if (!val) return new RegExp;
if (isArray(val)) val = val.join("|");
if (Array.isArray(val)) val = val.join("|");
if (isString(val)) return new RegExp(val || "");

@@ -45,3 +43,3 @@ if (isRegExp(val)) return val;

if (isString(val)) return (val ? val.split(',') : []);
if (isArray(val)) return val;
if (Array.isArray(val)) return val;
throw new TypeError("illegal type for arrayify");

@@ -140,7 +138,6 @@ };

const debouncedHandleChange = debounce(handleChange, DEBOUNCE_DURATION);
watcher.on('change', debouncedHandleChange);
watcher.on('add', debouncedHandleChange);
watcher.on('unlink', debouncedHandleChange);
watcher.on('change', handleChange);
watcher.on('add', handleChange);
watcher.on('unlink', handleChange);

@@ -168,2 +165,4 @@ watcher.on('ready', () => {

const debouncedRestartApp = debounce(restartApp, DEBOUNCE_DURATION)
function handleChange(file) {

@@ -175,3 +174,3 @@ const absoluteFile = file.startsWith('/') ? file : path.join(cwd, file);

// file is in use by the app, let's restart!
restartApp();
debouncedRestartApp();
}

@@ -223,3 +222,2 @@

const currentPipeFd = pipeFd;
const currentPipeFilename = pipeFilename;

@@ -310,3 +308,3 @@ let hasRestarted = false;

runnerExecArgv.push(typeof(program.debug) === 'boolean'
? `--debug`
? `--debug`
: `--debug=${program.debug}`

@@ -323,3 +321,3 @@ )

const inspectArg = typeof(program.inspect) === 'boolean'
? `--inspect`
? `--inspect`
: `--inspect=${program.inspect}`

@@ -330,4 +328,4 @@ runnerExecArgv.push(inspectArg);

if (program.inspectBrk) {
const inspectBrkArg = typeof(program.inspectBrk) === 'boolean'
? `--inspect-brk`
const inspectBrkArg = typeof(program.inspectBrk) === 'boolean'
? `--inspect-brk`
: `--inspect-brk=${program.inspectBrk}`

@@ -348,5 +346,5 @@ runnerExecArgv.push(inspectBrkArg)

handleFileLoad(filename, (source, sourceMap) => {
const sourceBuf = new Buffer(source || 0);
const mapBuf = new Buffer(sourceMap ? JSON.stringify(sourceMap) : 0);
const lenBuf = new Buffer(4);
const sourceBuf = new Buffer.from(source || '');
const mapBuf = new Buffer.from(sourceMap ? JSON.stringify(sourceMap) : []);
const lenBuf = new Buffer.alloc(4);
if (pipeFd) {

@@ -353,0 +351,0 @@ try {

{
"name": "babel-watch",
"version": "7.0.0",
"version": "7.1.0",
"description": "Reload your babel-node app on JS source file changes. And do it *fast*.",

@@ -9,2 +9,5 @@ "main": "babel-watch.js",

},
"engines": {
"node": ">= 8"
},
"repository": {

@@ -31,9 +34,8 @@ "type": "git",

"dependencies": {
"chokidar": "^1.4.3",
"commander": "^2.9.0",
"chokidar": "^3.4.3",
"commander": "^6.2.0",
"lodash.debounce": "^4.0.8",
"lodash.isarray": "^4.0.0",
"lodash.isregexp": "^4.0.1",
"lodash.isstring": "^4.0.1",
"source-map-support": "^0.4.0"
"source-map-support": "^0.5.19"
},

@@ -40,0 +42,0 @@ "peerDependencies": {

@@ -102,3 +102,5 @@ # babel-watch

* `babel-watch >= 2.0.7` is compatible with `@babel/core` version `7.0.0` and above
`babel-watch`'s versions now mirror the major version range of the Babel version it is compatible with. Currently, that is `7.x`.
* `babel-watch >= 2.0.7` (and now `7.x`) is compatible with `@babel/core` version `7.0.0` and above
* `babel-watch < 2.0.7 && >= 2.0.2` is compatible with `babel-core` version `6.5.1`

@@ -105,0 +107,0 @@ * `babel-watch <= 2.0.1` is compatible with `babel-core` from `6.4.x` up to `6.5.0`

@@ -11,3 +11,3 @@ 'use strict';

let pipeFd;
const BUFFER = new Buffer(10 * 1024);
const BUFFER = new Buffer.alloc(10 * 1024);

@@ -19,3 +19,3 @@ // Node by default uses '.js' loader to load all the files with unknown extensions

let bytes = 0;
while (bytes !== 4) {
while (typeof bytes === 'number' && bytes !== 4) {
bytes = fs.readSync(fd, BUFFER, 0, 4);

@@ -28,3 +28,3 @@ }

let length = readLength(fd);
let result = new Buffer(0);
let result = new Buffer.alloc(0);
while (length > 0) {

@@ -31,0 +31,0 @@ const newBytes = fs.readSync(fd, BUFFER, 0, Math.min(BUFFER.length, length));

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