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.6.2 to 0.7.0

6

CHANGELOG.md
# @farmfe/runtime
## 0.7.0
### Minor Changes
- d604b5e: Support React SSR
## 0.6.2

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

2

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

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

import { ModuleSystem } from './module-system';
// Injected during build
declare const __farm_global_this__: any;
import { __farm_global_this__ } from './resource-loader';

@@ -5,0 +4,0 @@ __farm_global_this__.__farm_module_system__ = (function () {

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

declare const __farm_global_this__: any;
// Injected during build
declare const __farm_namespace__: string;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
export const __farm_global_this__: any = (globalThis ||
window ||
global ||
self)[__farm_namespace__];

@@ -26,3 +33,12 @@ export const targetEnv = __farm_global_this__.__FARM_TARGET_ENV__ || 'node';

load(resource: Resource): Promise<void> {
if (targetEnv === 'node') {
if (resource.type === 'script') {
return this._loadScript(`./${resource.path}`);
} else if (resource.type === 'link') {
return this._loadLink(`./${resource.path}`);
}
}
let index = 0;
while (index < this.publicPaths.length) {

@@ -79,5 +95,5 @@ const publicPath = this.publicPaths[index];

if (targetEnv === 'node') {
return Promise.reject(new Error('Not support loading css in SSR'));
// await import(path);
// TODO investigate how to load css in SSR
// return Promise.reject(new Error('Not support loading css in SSR'));
// ignore css loading in SSR
return Promise.resolve();
} else {

@@ -84,0 +100,0 @@ return new Promise((resolve, reject) => {

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