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

@web/dev-server-core

Package Overview
Dependencies
Maintainers
7
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web/dev-server-core - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

8

dist/middleware/PluginTransformCache.js

@@ -30,6 +30,6 @@ "use strict";

this.lruCache = new lru_cache_1.default({
length: (e, key) => e.body.length + (key ? key.length : 0),
max: 52428800,
sizeCalculation: (e, key) => e.body.length + (key ? key.length : 0),
maxSize: 52428800,
noDisposeOnSet: true,
dispose: cacheKey => {
dispose: (_value, cacheKey) => {
// remove file path -> url mapping when we are no longer caching it

@@ -49,3 +49,3 @@ for (const [filePath, cacheKeysForFilePath] of this.cacheKeysPerFilePath.entries()) {

for (const cacheKey of cacheKeys) {
this.lruCache.del(cacheKey);
this.lruCache.delete(cacheKey);
}

@@ -52,0 +52,0 @@ }

@@ -61,3 +61,4 @@ "use strict";

try {
resolvedImportFilePath = (_a = (await resolveConcatenatedImport(importSpecifier, resolveImport, code, line, column))) !== null && _a !== void 0 ? _a : importSpecifier;
resolvedImportFilePath =
(_a = (await resolveConcatenatedImport(importSpecifier, resolveImport, code, line, column))) !== null && _a !== void 0 ? _a : importSpecifier;
}

@@ -69,3 +70,4 @@ catch (error) {

else {
resolvedImportFilePath = (_b = (await resolveImport(importSpecifier, code, line, column))) !== null && _b !== void 0 ? _b : importSpecifier;
resolvedImportFilePath =
(_b = (await resolveImport(importSpecifier, code, line, column))) !== null && _b !== void 0 ? _b : importSpecifier;
}

@@ -72,0 +74,0 @@ return resolvedImportFilePath;

@@ -0,1 +1,2 @@

import { Middleware } from 'koa';
import { FSWatcher } from 'chokidar';

@@ -8,3 +9,3 @@ import { DevServerCoreConfig } from './DevServerCoreConfig';

*/
export declare function createMiddleware(config: DevServerCoreConfig, logger: Logger, fileWatcher: FSWatcher): import("koa-compose").Middleware<import("koa").ParameterizedContext<import("koa").DefaultState, import("koa").DefaultContext, any>>[];
export declare function createMiddleware(config: DevServerCoreConfig, logger: Logger, fileWatcher: FSWatcher): Middleware<import("koa").DefaultState, import("koa").DefaultContext, any>[];
//# sourceMappingURL=createMiddleware.d.ts.map
{
"name": "@web/dev-server-core",
"version": "0.4.1",
"version": "0.5.0",
"publishConfig": {

@@ -31,3 +31,3 @@ "access": "public"

"engines": {
"node": ">=10.0.0"
"node": ">=16.0.0"
},

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

"@types/ws": "^7.4.0",
"@web/parse5-utils": "^1.3.1",
"@web/parse5-utils": "^2.0.0",
"chokidar": "^3.4.3",

@@ -74,3 +74,3 @@ "clone": "^2.1.2",

"koa-static": "^5.0.0",
"lru-cache": "^6.0.0",
"lru-cache": "^8.0.4",
"mime-types": "^2.1.27",

@@ -85,3 +85,2 @@ "parse5": "^6.0.1",

"@types/koa-static": "^4.0.1",
"@types/lru-cache": "^5.1.0",
"@types/parse5": "^6.0.1",

@@ -88,0 +87,0 @@ "abort-controller": "^3.0.0",

@@ -33,7 +33,7 @@ import LRUCache from 'lru-cache';

constructor(private fileWatcher: FSWatcher, private rootDir: string) {
this.lruCache = new LRUCache({
length: (e, key) => e.body.length + (key ? key.length : 0),
max: 52428800,
this.lruCache = new LRUCache<string, CacheEntry>({
sizeCalculation: (e, key) => e.body.length + (key ? key.length : 0),
maxSize: 52428800,
noDisposeOnSet: true,
dispose: cacheKey => {
dispose: (_value, cacheKey) => {
// remove file path -> url mapping when we are no longer caching it

@@ -54,3 +54,3 @@ for (const [filePath, cacheKeysForFilePath] of this.cacheKeysPerFilePath.entries()) {

for (const cacheKey of cacheKeys) {
this.lruCache.del(cacheKey);
this.lruCache.delete(cacheKey);
}

@@ -57,0 +57,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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