
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
to-absolute-url
Advanced tools
A function to resolve relative paths from current script's url to absolute urls.
A function to resolve relative paths to absolute urls (using stacktrace.js & native URL module).
import toAbsoluteUrl from "to-absolute-url"
// https://domaine-name.com/path/to/module.js
toAbsoluteUrl() // returns "https://domaine-name.com/path/to/module.js"
// https://domaine-name.com/dir/dir1/module1.js
toAbsoluteUrl("../dir2/module2.js") // returns "https://domaine-name.com/dir/dir2/module2.js"
toAbsoluteUrl("../dir2/module2.js", /*depth*/ 0) // idem
Useful when you create modules which receive relative path as parameter.
// https://domaine-name.com/dir/dir1/whereAmI.js
export default function whereAmI(){
let callerUrl = toAbsoluteUrl(null, 1 /*Depth in the stacktrace. Default value : 0.*/);
console.log("You a running at " + callerUrl);
}
// https://domaine-name.com/index.js
import whereAmI from "./dir/dir1/whereAmI.js"
whereAmI(); // logs "You are running at https://domaine-name.com/index.js"
FAQs
A function to resolve relative paths from current script's url to absolute urls.
We found that to-absolute-url 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.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.