thehardwarestore.ai

where AI agents shop for the right tools

── 99235 repos indexed ── | filtered by tag: shim
zloirock/core-js ★ 25527 1679 APPLICATION

core-js is a modular JavaScript standard library and polyfill system, not an end-user application. In production it supplies spec-compliant implementations of ECMAScript features, TC39 proposals, and selected web platform APIs for environments that lack native support. Its primary runtime behavior is side-effectful import: consumers load entry points such as `core-js`, `core-js/actual`, `core-js/full`, `core-js/es`, or granular per-feature modules, and the library either patches built-in constructors/prototypes or, in the `core-js-pure` variant, exports standalone implementations without global pollution. The architecture is a monorepo of packages: `core-js` (global polyfills), `core-js-pure` (pollution-free), `core-js-bundle` (prebuilt bundle), `core-js-compat` (compatibility data and module-selection engine), and `core-js-builder` (custom bundle generator). The implementation is split into thousands of tiny modules under `packages/core-js/modules/`, backed by a shared `internals/` layer that provides low-level spec operations, feature detection, environment/bug detection, iterator construction, collection internals, and export plumbing. Polyfill activation is decided by a `$({ target, stat, proto, forced }, ...)` export contract plus per-module `FORCED` flags derived from runtime probes and engine-version checks. Entry-point tiers (`es`, `stable`, `actual`, `full`, `stage`, `proposals`) map to spec maturity levels. Its primary data flow is configuration-driven: a consumer chooses an import path or, through Babel/swc integration, a set of target environments; `core-js-compat` converts targets into the minimum required module set; and `core-js-builder` can produce a custom bundle. The library itself depends on very few runtime dependencies; Babel, webpack, QUnit, Karma, and a matrix of JS engines are used for building, bundling, and testing. The codebase is unusually rigorous about spec conformance, including engine-specific bug workarounds and dual global/pure test suites. It is effectively the reference polyfill engine behind Babel's `useBuiltIns` and is highly study-worthy for anyone implementing low-level JavaScript compatibility layers.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
mottosso/Qt.py ★ 994 261 APPLICATION

Qt.py is a single-file Python compatibility shim that provides a unified API across PySide6, PyQt6, PySide2, and PyQt5 Qt bindings. It exports a curated set of common member classes and functions, ensuring that code written with `from Qt import ...` works identically on any supported binding. The library handles disparities in module structure (e.g., QAction location), different signal/slot syntax, and missing utilities like `loadUi` by implementing its own `QUiLoader`-based fallback. It also includes a command-line tool for converting PySide2-compiled .ui files, and supports per-import configuration via environment variables and `QtSiteConfig.py`. While primarily a library, it has CLI entry points and extensive test infrastructure.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
tfutils/tfenv ★ 4983 468 APPLICATION

tfenv is a command-line Terraform version manager written in Bash, modelled after rbenv. It provides a `terraform` shim that intercepts invocations and selects the appropriate Terraform binary based on a `.terraform-version` file, the `TFENV_TERRAFORM_VERSION` environment variable, or the default version file under `TFENV_CONFIG_DIR`. The repository implements full version lifecycle operations: install (download, verify SHA256 and optional PGP signatures, unzip), switch (`use`), uninstall (including multiple versions), list local and remote versions, pin current version, and a `min-required`/`latest-allowed` resolver that reads `required_version` constraints from `.tf` files. Architecturally it follows the rbenv pattern: a dispatcher (`bin/tfenv`), a shim (`bin/terraform`), shared libraries in `lib/` (logging, version-file discovery, version-name resolution, execution), and standalone subcommand scripts in `libexec/` that each include boilerplate to resolve `TFENV_ROOT`. The code deliberately avoids shellcheck and additional dependencies, maintaining portability across Linux, macOS, and Windows (git-bash). An extensive integration test suite downloads real Terraform binaries, and CI covers a broad OS matrix plus Docker validation. The codebase demonstrates solid engineering practice for a Bash project: clean separation of concerns, a capable logging library (`lib/bashlog.sh`) that supports file, JSON, syslog and coloured console output; careful handling of cross-platform differences (BSD vs GNU grep, CRLF line endings, ARM architecture detection); and a concurrency-safe install lock using atomic `mkdir`. Notable weaknesses are intentional boilerplate duplication across `libexec/` scripts, a test runner that historically exits 0 on failure (documented as a known bug being fixed), and regex-based HCL constraint parsing that is functional but fragile. A proposed ADR outlines a future Go edition, but the Bash implementation remains canonical.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 3 reusable components found
pubkey/broadcast-channel ★ 2000 131 APPLICATION

This repository is a JavaScript library providing a BroadcastChannel polyfill with leader election capabilities. It enables cross-tab/window/node-process communication through multiple fallback mechanisms (native BroadcastChannel, IndexedDB, localStorage, Node.js sockets, and a simulate method). The library implements leader election algorithms to coordinate multiple instances, ensuring only one acts as leader at a time. It supports diverse environments including old browsers, modern browsers, WebWorkers, Node.js, Deno, and iframes. The architecture centers around a core BroadcastChannel class with pluggable method implementations, a method chooser for fallback selection, and separate leader election utilities. Key entry points are the exported BroadcastChannel class and createLeaderElection function from src/index.js.

RATING: 8.0/10 MAINT: active DRIFT: low
▸ 4 reusable components found
Wscats/requirejs-demo ★ 199 38 APPLICATION

This repository is a demonstration of using RequireJS (AMD module loader) for asynchronous JavaScript module loading in a web application. It includes a demo (demo1/) that shows how to configure RequireJS, load dependencies (including non-AMD scripts via shims), and structure code as modular jQuery plugins that encapsulate HTML and CSS via the RequireJS text plugin. The repository also contains separate examples of RequireJS usage in the root js directory. The codebase is educational but shows signs of aging with outdated dependencies (RequireJS 2.1.11, jQuery 3.1.0, Bootstrap 4.0.0) and appears to have no recent updates.

RATING: 6.4/10 MAINT: stale DRIFT: high
▸ 2 reusable components found
── end of results ──
$ submit: