Socket
Book a DemoInstallSign in
Socket

@crossplane-js/libs

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crossplane-js/libs

Shared libraries for Crossplane XFuncJS

0.0.29
latest
npmnpm
Version published
Maintainers
2
Created
Source

Skyhook Libs

This package contains shared libraries for Crossplane Skyhook.

Recent Changes

YAML Parsing in pkg/node/process.go

The code now properly parses the .yarnrc.yml file using the sigs.k8s.io/yaml library instead of string manipulation.

Direct Yarn Execution

We've improved the yarn installation process by directly executing the yarn binary from the path specified in the .yarnrc.yml file. This approach:

  • Extracts the yarnPath from the .yarnrc.yml file
  • Constructs the absolute path to the yarn executable
  • Executes it directly with Node.js

Implementation Details

The Go code now:

  • Parses the .yarnrc.yml file to extract the yarnPath value
  • Falls back to a default path if not found
  • Executes the yarn binary directly:
// Extract the yarnPath from the .yarnrc.yml file
var yarnPath string
if yarnConfig != nil {
    if path, ok := yarnConfig["yarnPath"].(string); ok {
        yarnPath = path
    }
}

// If yarnPath is not found, use the default yarn executable
if yarnPath == "" {
    yarnPath = ".yarn/releases/yarn-4.7.0.cjs"
}

// Construct the absolute path to the yarn executable
yarnExecPath := filepath.Join("/app", yarnPath)

// Run yarn install using the extracted yarn executable
yarnCmd := exec.Command("node", yarnExecPath, "install")
yarnCmd.Dir = uniqueDirPath // Set the working directory

This approach ensures that the yarn installation process runs in a separate process and doesn't block the main Node.js process, while also being more robust by using the exact yarn executable specified in the project configuration.

FAQs

Package last updated on 02 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.