🎩 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.10
to
1.0.11
+14
-22
dist/hmr-proxy.cjs

@@ -14,8 +14,2 @@ /**

const { Debounce } = require('./util.js');
const { hookServices, unblocks } = require('./hmr-hook.js');
hookServices();
const Module = require('node:module');

@@ -26,7 +20,3 @@ // noinspection JSUnresolvedReference

const loaded = oldLoad.call(this, request, parent, isMain);
if (
parent &&
!/node_modules/.test(parent.filename) &&
!/package\\modmgr\\src\\hmr-proxy.cjs/.test(parent.filename)
) {
if (parent && !/node_modules/.test(parent.filename) && !/package\\tsxx\\/.test(parent.filename)) {
const { filename, children } = parent;

@@ -72,13 +62,15 @@ if (!aliveFilenames.includes(filename)) {

const { Debounce } = require('./util.js');
const { hookServices, unblocks } = require('./hmr-hook.js');
hookServices();
const debouncedFunc = new Debounce(freshFilename => {
if (aliveFilenames.includes(freshFilename)) {
unblocks().then(() => {
cleanModuleCache(freshFilename);
try {
require(pathname);
} catch (e) {
console.error(e);
}
});
}
unblocks().then(() => {
cleanModuleCache(freshFilename);
try {
aliveFilenames.push(pathname);
require(pathname);
} catch (e) {
console.error(e);
}
});
}, 500);

@@ -91,5 +83,5 @@

chokidar.watch(process.cwd()).on('change', freshFilename => {
if (!/node_modules/.test(freshFilename) && !/idea/.test(freshFilename)) {
if (aliveFilenames.includes(freshFilename)) {
debouncedFunc.call(freshFilename);
}
});
{
"name": "tsxx",
"version": "1.0.10",
"version": "1.0.11",
"description": "tsx 增强",

@@ -16,3 +16,3 @@ "scripts": {

"author": "杨伟杰",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {

@@ -19,0 +19,0 @@ "chokidar": "^3.5.3",