
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@packlet/core
Advanced tools
Core utilities for packlet: artifact manifest, validation, name derivation.
@packlet/core provides the foundational utilities used across the Packlet ecosystem for producing deterministic release artifacts and resolving unified configuration. It offers cryptographic helpers, artifact manifest tooling, name derivation logic, directory utilities, and a centralized configuration model for both CLI and programmatic consumers.
ArtifactEntry, ArtifactsManifestV1).computeSha512(filePath) — compute SHA-512 digests.listArtifacts(dir) and writeArtifactsManifest(dir, data) — enumerate .tgz artifacts and emit artifacts.json.validateDist({ distDir }) — verify the presence of expected build outputs.deriveScopedName, extractRepoName, copyRecursive.All exports are available from src/index.ts.
@packlet/core implements the unified configuration loader used by other Packlet tools. It consolidates defaults, environment variable parsing, directory conventions, and precedence rules.
packlet block in package.json.package.json.packlet > built-in defaults.Configuration schema (excerpt):
{
"packlet": {
"distDir": "dist",
"artifactsDir": ".artifacts",
"gprDir": ".gpr",
"build": {
"entry": "src/index.ts",
"outdir": "dist",
"formats": ["esm"],
"sourcemap": "none",
"types": true,
"target": "node",
"execJs": false,
"minify": true,
"external": ["react"],
"externalAuto": true
},
"gpr": true,
"gprName": "packlet-core",
"scope": "nazahex",
"registry": "https://npm.pkg.github.com/",
"includeReadme": true,
"includeLicense": true,
"validate": { "dist": "dist" },
"listArtifacts": { "artifactsDir": ".artifacts" }
}
}
Environment variables parsed by readPackletEnv() include:
PACKLET_DIST_DIR, PACKLET_ARTIFACTS_DIR, PACKLET_GPR_DIRPACKLET_BUILD_ENTRY, PACKLET_BUILD_OUTDIR, PACKLET_BUILD_FORMATS,
PACKLET_SOURCEMAP, PACKLET_TYPES, PACKLET_TARGET,
PACKLET_EXEC_JS, PACKLET_MINIFY,
PACKLET_EXTERNAL (comma-separated), PACKLET_EXTERNAL_AUTOGPR_NAME, GPR_SCOPE, GPR_REGISTRY, GPR_INCLUDE_README, GPR_INCLUDE_LICENSEloadPackletConfig(rootDir: string): PackletConfigV1readPackletEnv(env?: NodeJS.ProcessEnv): PackletEnvresolveBuildOptions({ cli?, env?, cfg?, defaults? }): ResolvedBuildOptionsresolveGprOptions({ cli?, env?, cfg?, defaults? }): ResolvedGprOptionsresolveValidateOptions({ cli?, env?, cfg?, defaults? })resolveListArtifactsOptions({ cli?, env?, cfg?, defaults? })Example:
import {
loadPackletConfig,
readPackletEnv,
resolveBuildOptions,
resolveGprOptions
} from "@packlet/core"
const root = process.cwd()
const cfg = loadPackletConfig(root)
const env = readPackletEnv()
const build = resolveBuildOptions({
cli: { formats: "esm,cjs" },
env,
cfg
})
const gpr = resolveGprOptions({
cli: { root },
env,
cfg
})
import {
deriveScopedName,
writeArtifactsManifest,
validateDist,
listArtifacts
} from "@packlet/core"
const { baseName, scopedName } = deriveScopedName({
name: "my-lib",
override: "packlet-core",
scope: "acme"
})
console.log(scopedName) // @acme/my-lib
const v = validateDist({ distDir: "./dist" })
if (!v.ok) console.warn("Missing dist files:", v.missing)
writeArtifactsManifest("./.artifacts", {
packageName: baseName,
scopedName,
version: "0.1.0"
})
computeSha512(filePath) — returns a hex-encoded SHA-512 digest.listArtifacts(dir) — returns an array of { file, size, sha512 } for .tgz files.writeArtifactsManifest(dir, data) — writes artifacts.json (v1) and returns the manifest.validateDist({ distDir, expected? }) — checks for common output files (index.js, index.mjs, index.d.ts) and reports missing entries.deriveScopedName({ name, repoUrl?, override?, scope? }) — derives consistent base and scoped names.
Edge cases:
listArtifacts returns an empty array if the directory does not exist.writeArtifactsManifest invokes listArtifacts if no artifact list is provided.MIT © KazViz
FAQs
Core utilities for packlet: artifact manifest, validation, name derivation.
We found that @packlet/core 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.