Repository navigation
chore(alpha): pin Jess 2.0.0-alpha.32; @plugin runs through less.render() and lessc - #4569
Conversation
…in the Deno sandbox less.render() built the base Jess compiler with Less's default plugins through hooks, which cannot be rebuilt elsewhere. LessCompiler wraps that setup in a class that declares its module identity, so a Jess release that runs @plugin renders whole in the @jesscss/plugin-js sandbox can make the same compiler there. With the current Jess pins nothing changes.
contrast(#ff0000) moves from #ffffff to #000000: red's ratio against black is 5.25, against white 4. `legacy/functions.css` already belongs to the `legacy/functions.less` fixture pair, so the previous value is recorded here.
…, and capture headers Five expected outputs move to what Jess 2.0.0-alpha.32 writes: - A slash list held by a variable or mixin argument divides once math that computes reads it: `operations-advanced` (`result: 10px`) and `parens-division/mixins-args` (`depth: 8%`). - Under parens-division, math beside a slash that does not divide is kept as written, and a parenthesized group still computes: `parens-division/parens` (`border-radius-keep: 4px * 2 / 4 + 3px`). - `percentage()` over an input only the browser knows prints its CSS form: `math-css-vars` (`e: calc(var(--p) * 100%)`). - `parse-interpolation`: a `selector(...)` capture prints one branch per line in a nested header, and the quoted `.e-quoted` case now reads `foo: baz`, which its source writes (the previous golden was a typo).
Moves the six Jess pins and the lockfile to 2.0.0-alpha.32, whose parser packages pin parseman exactly at 0.61.3. The packed consumer proof now also installs the optional @jesscss/plugin-js peer and runs `@plugin` through `less.render()` and `lessc`. That render runs whole in the plugin's Deno sandbox, where the compiler is made again from `LessCompiler.moduleIdentity`, so it fails with `plugin/load-failed` if the identity goes away. The peer is installed only in that consumer, so the fixture suite's environment does not change.
`npm rebuild deno` exits 0 and leaves no binary on npm 12, so the @plugin check found no Deno on Node current. Running the package's own install.cjs works on every npm.
…ting `.fruit-cap-` before a `&` is a class of its own, not a name prefix, and this fixture sets collapseNesting:false, so the block stays nested under the captured list instead of building `.fruit-cap-apple`.
`Compiler.renderToResult` reads `process.stderr.isTTY` for its colour default, so on Jess 2.0.0-alpha.32 every `less.render()` in the browser bundle threw. A new smoke test in `test:alpha` loads the built bundle in a `vm` context with no Node `process` and renders through `window.less`.
…` runs `@plugin`
The fixture now matches its golden, so its expected-failure entry comes out. The
packed consumer proof also runs `@plugin` through `require('less').render()`,
which loads the bundled CommonJS build, beside the ESM and `lessc` paths.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
[Medium impact] The reviewed changes appear safe to merge; no actionable defect was established.
|
Changes
2.0.0-alpha.32; the lockfile moves parseman to 0.61.3.LessCompilernames its module, so a render that reaches a@pluginscript runs whole in the@jesscss/plugin-jsDeno sandbox.@pluginnow works throughless.render(),require('less').render()andlesscwhen@jesscss/plugin-jsis installed.contrast()golden, and goldens for slash-list math,percentage()overvar(), and captures inparse-interpolation, which now gates at full bytes.processshim gainsstderrandstdout. On this Jess, everyless.render()in the bundle threw onisTTYwithout them.test:alphanow loads the built bundle in avmcontext and renders throughwindow.less.sourceMapin the browser is not covered; it already fails withBuffer is not defined.verify:alpha:packed-consumerinstalls@jesscss/plugin-jsin its consumer and runs@pluginthroughless.render(),require('less').render()andlessc. Without the module identity this fails withplugin/load-failed.Output changes from 5.0.0-alpha.17
parens-divisionstays as written:@a * 2 / @b + 1gives4px * 2 / 3px + 1, not8px / 4px.percentage(16/17)gives94.11764706%,unit(80/16, rem)gives5rem.contrast()picks the colour with the better contrast ratio:contrast(#808080)is now#000000. An explicit threshold argument keeps the old rule.percentage(var(--x))givescalc(var(--x) * 100%).