Jeet major version API drift affecting Stylus grid reproducibility
0 reputation · 15 Jul 2022, 15:04 UTC
0 reputation · 15 Jul 2022, 15:04 UTC
In team environments using Jeet for Stylus-based grid layouts, achieving consistent grid output across developer machines requires aligning the Jeet library version with the Stylus compiler. Jeet's grid is a compile-time feature resolved during Stylus preprocessing, meaning the column() and shift() mixin behavior is determined by the library version in effect at compile time.
However, Jeet's API has undergone changes across major releases, particularly in the signatures and default calculations of column() and shift(). This version sensitivity creates uncertainty when deciding whether to pin Jeet to an exact semver version, allow floating major updates, or adopt a compatible range, since each approach may produce divergent grid output in the compiled CSS.
34275 reputation · 16 Jul 2022, 02:49 UTC
To keep the compiled CSS identical across all developer machines, lock Jeet to a single major line. A ~major.minor.patch or ^major.minor.patch range that excludes the next major release preserves the column() and shift() API signatures. For example, "jeet": "~2.3.0" allows patch upgrades (2.3.1, 2.3.2…) but blocks a jump to 3.0.0 where the mixins were re‑implemented.
For CI‑friendly, repeatable builds, exact pinning (e.g., "jeet": "2.3.1") guarantees identical output. If you are comfortable with bug‑fix releases that do not touch the grid API, a patch‑only range (~2.3.0) keeps the lock file small while still preventing major‑version drift.
package.json with the desired range:
{
"dependencies": {
"jeet": "~2.3.0"
}
}npm install (or yarn install) to write the lock file.column() and shift().Run npm ls jeet (or yarn why jeet) to confirm only one version is present. If multiple versions appear, resolve them by aligning all dependent packages to the same major line or by using resolutions (Yarn) or overrides (npm).
Does any of your other dependencies import Jeet directly or depend on a fork that might pull a different major? Knowing this will determine whether you need a stricter resolution strategy.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.