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
0
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.12.2 to 0.12.3

6

CHANGELOG.md
# @farmfe/runtime
## 0.12.3
### Patch Changes
- ae6e0ca9: Fix import compatibility
## 0.12.2

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

2

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

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

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

ResourceLoader,
__global_this__,
isBrowser,

@@ -105,4 +106,4 @@ targetEnv,

if (!(globalThis || global || window || {}).require) {
(globalThis || global || window || { require: undefined }).require =
if (!__global_this__.require) {
__global_this__.require =
this.require.bind(this);

@@ -109,0 +110,0 @@ }

@@ -13,6 +13,7 @@ // using native ability to load resources if target env is node.

export const __farm_global_this__: any = '<@__farm_global_this__@>';
export const __global_this__: any = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
export const targetEnv = __farm_global_this__.__FARM_TARGET_ENV__ || 'node';
export const isBrowser =
targetEnv === 'browser' && (globalThis || window).document;
targetEnv === 'browser' && __global_this__.document;

@@ -139,3 +140,4 @@ /**

private _loadScript(path: string): Promise<void> {
if (!isBrowser) {
// @ts-ignore
if (FARM_RUNTIME_TARGET_ENV !== 'browser') {
return import(path);

@@ -159,3 +161,4 @@ } else {

private _loadLink(path: string): Promise<void> {
if (!isBrowser) {
// @ts-ignore
if (FARM_RUNTIME_TARGET_ENV !== 'browser') {
// return Promise.reject(new Error('Not support loading css in SSR'));

@@ -162,0 +165,0 @@ // ignore css loading in SSR

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