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

@farmfe/runtime

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farmfe/runtime - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

6

CHANGELOG.md
# @farmfe/runtime
## 0.4.0
### Minor Changes
- a5364b5: Extract plugin react into a single plugin
## 0.3.4

@@ -4,0 +10,0 @@

5

package.json
{
"name": "@farmfe/runtime",
"version": "0.3.4",
"version": "0.4.0",
"description": "Runtime of Farm",

@@ -15,4 +15,5 @@ "author": {

"scripts": {
"build": "tsc -p tsconfig.json --noEmit"
"build": "tsc -p tsconfig.json --noEmit",
"type-check": "tsc -p tsconfig.json --noEmit"
}
}

19

src/module-system.ts

@@ -6,3 +6,3 @@ import { Module } from './module';

/* eslint-disable @typescript-eslint/no-explicit-any */
type ModuleInitialization = (
export type ModuleInitialization = (
module: Module,

@@ -27,6 +27,9 @@ exports: any,

pluginContainer: FarmRuntimePluginContainer;
//cache may clear In applyHotUpdates. We need another constructor to cache module in temporary
//after `module.meta.hot.tap`, clear hmrCache
hmrCacheTemporary: Map<string, Module>;
constructor() {
this.modules = {};
this.cache = {};
this.hmrCacheTemporary = new Map();
this.publicPaths = [];

@@ -143,2 +146,13 @@ this.dynamicModuleResourcesMap = {};

setHmrCacheTemporary(moduleId: string) {
if (!this.hmrCacheTemporary.has(moduleId) && this.cache[moduleId]) {
return this.hmrCacheTemporary.set(moduleId, this.cache[moduleId]);
}
return null;
}
clearHmrCacheTemporary() {
this.hmrCacheTemporary.clear();
}
update(moduleId: string, init: ModuleInitialization): void {

@@ -161,2 +175,3 @@ this.modules[moduleId] = init;

if (this.modules[moduleId]) {
this.setHmrCacheTemporary(moduleId);
delete this.cache[moduleId];

@@ -163,0 +178,0 @@ return true;

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