
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
Cross-platform ESM path helpers.
Because Node.js ESM path handling on Windows is messy with POSIX.
npm i add -E esm-path
or:
yarn add -E esm-path
import { getAbsolutePath } from 'esm-path'
getAbsolutePath(importMetaUrl: string, ...relativePaths: string[]): string
importMetaUrl: must always be import.meta.url....relativePaths: list of paths, relative to the directory or file from which this function is called.Return the absolute path of the targetted directory or file.
import { getAbsolutePath } from 'esm-path'
const currentDirectoryPath = getAbsolutePath(import.meta.url)
console.log(currentDirectoryPath)
const parentDirectoryPath = getAbsolutePath(import.meta.url, '..')
console.log(parentDirectoryPath)
// Adapt the relative path to your case
const packageJsonFilePath = getAbsolutePath(import.meta.url, '../package.json')
console.log(packageJsonFilePath)
// Adapt the relative path to your case
const packageJsonFilePath = getAbsolutePath(import.meta.url, '..' , 'package.json')
console.log(packageJsonFilePath)
FAQs
Cross-platform ESM path helpers.
The npm package esm-path receives a total of 38 weekly downloads. As such, esm-path popularity was classified as not popular.
We found that esm-path demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.