GitShow/ljharb/global-cache
ljharb

global-cache

Sometimes you have to do horrible things, like use the global object to share a singleton. Abstract that away, with this!

by ljharb
Star on GitHubForknpm

JavaScript

20 stars4 forks2 contributorsQuiet · 6mo agoSince 2015MIT

Meet the team

See all 2 on GitHub →
ljharb
ljharb122 contributions
renovate-bot
renovate-bot1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
Aaronius
The `global` variable is assumed to existClosedIssue

Hi there! Here's the situation: Vite is becoming a more popular bundler. Unlike some other bundlers (e.g, Webpack), Vite does not provide a built-in variable. As such, if my project or any dependency uses global-cache, global-cache fails at runtime. !image In our case, we use react-dates, which has an indirect dependency on global-cache: !image global-cache fails because it assumes that exists, which it may not because, as far as I'm aware, was never part of any bundler/module spec outside of node. It was just a thing that some bundlers provided. This issue is discussed more in depth in the Vite repo. While there are workarounds, ideally global-cache would not depend on , rather than requiring users of Vite (or other bundlers that do not provide ) to implement those workarounds.

Aaronius · 4y ago
ljharb
[Tests] migrate tests to Github ActionsMergedPR

Per https://github.com/ljharb/object.assign/pull/81 travis-ci's new pricing plan, and its defaults, have caused all my repos to have zero CI whatsoever until December. @travis-ci Support is MIA, so I unfortunately can't rely on it as a service anymore.

ljharb · 5y ago
Structured data for AI agents

Repository: ljharb/global-cache. Description: Sometimes you have to do horrible things, like use the global object to share a singleton. Abstract that away, with this! Stars: 20, Forks: 4. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Open PRs: 0, open issues: 1. Last activity: 6mo ago. Community health: 85%. Top contributors: ljharb, renovate-bot.

·@ofershap

Replace github.com with gitshow.dev