Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@module-federation/sdk
Advanced tools
@module-federation/sdk
Documentation// The SDK can be used to parse entry strings, encode and decode module names, and generate filenames for exposed modules and shared packages.
// It also includes a logger for debugging and environment detection utilities.
// Additionally, it provides a function to generate a snapshot from a manifest and environment detection utilities.
import { parseEntry, encodeName, decodeName, generateExposeFilename, generateShareFilename, Logger, isBrowserEnv, isDebugMode, getProcessEnv, generateSnapshotFromManifest } from '@module-federation/sdk';
// Parse an entry string into a RemoteEntryInfo object
parseEntry('entryString');
// Encode a module name with a prefix and optional extension
encodeName('moduleName', 'prefix');
// Decode a module name with a prefix and optional extension
decodeName('encodedModuleName', 'prefix');
// Generate a filename for an exposed module
generateExposeFilename('exposeName', true);
// Generate a filename for a shared package
generateShareFilename('packageName', true);
// Create a new logger
const logger = new Logger('identifier');
// Check if the current environment is a browser
isBrowserEnv();
// Check if the current environment is in debug mode
isDebugMode();
// Get the process environment
getProcessEnv();
// Generate a snapshot from a manifest
generateSnapshotFromManifest(manifest, options);
parseEntry(str: string, devVerOrUrl?: string)
encodeName(name: string, prefix = '', withExt = false)
decodeName(name: string, prefix?: string, withExt?: boolean)
generateExposeFilename(exposeName: string, withExt: boolean)
generateShareFilename(pkgName: string, withExt: boolean)
new Logger(identifier?: string)
isBrowserEnv()
isDebugMode()
getProcessEnv()
generateSnapshotFromManifest(manifest: Manifest, options: IOptions = {})
The SDK uses Jest for testing. The configuration can be found in jest.config.js
. The tests are located in the tests directory.
FAQs
A sdk for support module federation
The npm package @module-federation/sdk receives a total of 490,642 weekly downloads. As such, @module-federation/sdk popularity was classified as popular.
We found that @module-federation/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.