🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

tsxx

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsxx - npm Package Compare versions

Comparing version
1.0.12
to
1.0.13
+24
-4
dist/hmr-proxy.cjs

@@ -68,3 +68,3 @@ /**

hookServices();
const debouncedFunc = new Debounce(freshFilename => {
const debouncedHmrFunc = new Debounce(freshFilename => {
unblocks().then(() => {

@@ -80,2 +80,21 @@ cleanModuleCache(freshFilename);

}, 500);
const debouncedRerunFunc = new Debounce(() => {
unblocks().then(() => {
// noinspection JSUnresolvedReference
for (const cacheName in Module._cache) {
// noinspection JSUnresolvedReference
delete Module._cache[cacheName];
}
for (const parentFilename in relationModuleFilenames) {
delete relationModuleFilenames[parentFilename];
}
aliveFilenames.splice(0, aliveFilenames.length);
try {
aliveFilenames.push(pathname);
require(pathname);
} catch (e) {
console.error(e);
}
});
});

@@ -86,6 +105,6 @@ /**

const chokidar = require('chokidar');
const chokidarWatcher = chokidar.watch(process.cwd());
const chokidarWatcher = chokidar.watch(process.cwd(), { ignored: /node_modules/ });
chokidarWatcher.on('change', freshFilename => {
if (aliveFilenames.includes(freshFilename) || globHmrFiles.includes(freshFilename)) {
debouncedFunc.call(freshFilename);
if (aliveFilenames.includes(freshFilename)) {
debouncedHmrFunc.call(freshFilename);
}

@@ -98,3 +117,4 @@ });

globHmrFiles.push(freshFilename);
debouncedRerunFunc.call();
}
});
+1
-1
{
"name": "tsxx",
"version": "1.0.12",
"version": "1.0.13",
"description": "tsx 增强",

@@ -5,0 +5,0 @@ "scripts": {