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.7.0 to 0.7.1

6

CHANGELOG.md
# @farmfe/runtime
## 0.7.1
### Patch Changes
- Fix bugs that dev server should only try read local file system resources for images and fonts
## 0.7.0

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

2

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

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

@@ -133,14 +133,21 @@ import { Module } from './module';

resources.map((resource) => this.resourceLoader.load(resource))
).then(() => {
const result = this.require(moduleId);
// if the module is async, return the default export, the default export should be a promise
if (result.__farm_async) {
return result.default;
} else {
return result;
}
});
)
.then(() => {
const result = this.require(moduleId);
// if the module is async, return the default export, the default export should be a promise
if (result.__farm_async) {
return result.default;
} else {
return result;
}
})
.catch((err) => {
console.error(`[Farm] Error loading dynamic module "${moduleId}"`, err);
// reload the page if the dynamic module loading failed
window.location.reload();
});
}
register(moduleId: string, initializer: ModuleInitialization): void {
// console.log(`[Farm] register module "${moduleId}"`, console.trace());
if (this.modules[moduleId]) {

@@ -147,0 +154,0 @@ // throw new Error(

@@ -24,2 +24,3 @@ // using native ability to load resources if target env is node.

private _loadedResources: Record<string, boolean> = {};
private _loadingResources: Record<string, Promise<void>> = {};

@@ -49,3 +50,6 @@ publicPaths: string[];

return;
} else if (this._loadingResources[resource.path]) {
return this._loadingResources[resource.path];
}
let promise = Promise.resolve();

@@ -59,2 +63,4 @@ try {

this._loadingResources[resource.path] = promise;
promise.then(() => {

@@ -61,0 +67,0 @@ this._loadedResources[resource.path] = 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