Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@firebase/remote-config
Advanced tools
The Remote Config package of the Firebase JS SDK
The @firebase/remote-config package is part of the Firebase platform and provides tools to configure and customize the behavior and appearance of your app without needing to publish an app update. It allows developers to define parameters in the Firebase Console and use them in their app to modify app behavior for different users.
Fetch and activate values
This feature allows developers to fetch remote configuration parameters and activate them in the app. The code sample demonstrates fetching and activating remote config values, then retrieving a specific parameter as a string.
const { getRemoteConfig, fetchAndActivate } = require('@firebase/remote-config');
async function fetchConfig() {
const remoteConfig = getRemoteConfig();
await fetchAndActivate(remoteConfig);
const value = remoteConfig.getString('welcome_message');
console.log('Welcome message:', value);
}
Set default values
This feature enables setting default values for configuration parameters within the app code. The code sample shows how to set a default value for a 'welcome_message' parameter, which will be used if no value is fetched from the server or while waiting for updated values.
const { getRemoteConfig, setDefaults } = require('@firebase/remote-config');
function setDefaultConfig() {
const remoteConfig = getRemoteConfig();
setDefaults(remoteConfig, {
'welcome_message': 'Hello, default!'
});
}
The 'config' package is used for managing configuration settings for Node.js applications. It does not support remote configuration management but is useful for organizing configuration settings within an application. Unlike @firebase/remote-config, it does not allow for dynamic updates from a remote server.
The 'dotenv' package is used to load environment variables from a .env file into process.env, providing a simple way to configure application settings. It differs from @firebase/remote-config as it does not support fetching configurations remotely or updating them without redeploying the application.
This is the Remote Config component of the Firebase JS SDK.
This package is not intended for direct usage, and should only be used via the officially supported firebase package.
Setup:
yarn
in repo rootFormat:
yarn prettier
in RC packageUnit test:
yarn test
in RC packageEnd-to-end test:
yarn build
in RC packageyarn build
in Firebase packageFAQs
The Remote Config package of the Firebase JS SDK
The npm package @firebase/remote-config receives a total of 1,586,854 weekly downloads. As such, @firebase/remote-config popularity was classified as popular.
We found that @firebase/remote-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.