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.
@types/snowpack-env
Advanced tools
TypeScript definitions for snowpack-env
npm install --save @types/snowpack-env
This package contains type definitions for snowpack-env (https://github.com/pikapkg/snowpack#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/snowpack-env.
interface ImportMetaHot {
/** Accept the HMR update. */
accept(
callback?: (update: {
/** The newer version of the current module */
module: unknown;
}) => void,
): void;
/** Accept the HMR update with dependencies update. */
accept(
dependencies: readonly string[],
callback: (update: {
/** The newer version of the current module */
module: unknown;
/** The newer version of dependencies. Order is same as the first argument. */
deps: unknown[];
}) => void,
): void;
/** Cleanup side-effects before load the newer version of this module. */
dispose(callback: () => void): void;
/** Mark the HMR as invalidated to reload the whole page. */
invalidate(): void;
/** Mark this module as HMR incompatible, always reload the page. */
decline(): void;
/** See https://github.com/pikapkg/esm-hmr#importmetahotdata */
data: unknown;
}
interface ImportMeta {
url: string;
// TypeScript Bug: https://github.com/microsoft/TypeScript/issues/41468
// When TS bug is fixed and ecosystem has upgraded, then it will be safe
// to change `hot` to the more correct "possibly undefined" (hot?: ...).
readonly hot: ImportMetaHot;
readonly env: {
readonly [key: string]: any;
readonly SNOWPACK_PUBLIC_API_URL: string;
readonly MODE: string;
readonly NODE_ENV: string;
readonly SSR?: boolean | undefined;
};
}
These definitions were written by Fred K. Schott, Michael Stramel, Drew Powers, and Jack Works.
FAQs
TypeScript definitions for snowpack-env
We found that @types/snowpack-env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.