Skip to content

oj v0.4.25

Choose a tag to compare

@github-actions github-actions released this 26 Nov 13:53
· 117 commits to main since this release
9721d04

Changed

  • StyleX: the compiler orders strings by UTF-16 code unit wherever it compared them by locale: the stylesheet's tie-breaks between rules of one priority, runs of pseudo-classes, and the at-rules of a theme override. That order is the one proposed for the JS compiler in meta/stylex#2066, which no released @stylexjs/babel-plugin has yet, so for some inputs the sheet differs from 0.19.2's. Rules move where the two orders disagree (" and ', upper and lower case, accented letters), and the class name of a rule whose pseudo-classes or theme at-rules reorder changes with its hash input. Numeric priorities, the pseudo-element boundaries and default first are as before. The compiler pass is 0.19.2-rs.2, so cached output is rebuilt.
  • TanStack Start dev: the client bundle's dependencies take none of the app's plugins, as under Vite. Vite's dev server pre-bundles the app's dependencies with its own resolver and no plugin of the app, and the plugins see the modules a page asks for, which are the app's. Here every module of the client graph went to the plugins' resolveId, load and transform, the dependencies' among them: on an app with some 19,000 dependency modules in its graph that was 74,000 resolveId and 22,000 transform calls on the plugin host's one thread before the first page, and about half of a cold start's client bundle. A script under node_modules (.js, .mjs, .cjs, .ts, .mts, .cts) is now resolved, loaded and compiled by the bundler alone, and the imports inside it are resolved without the plugins (the config's resolve.alias still applies). What Vite does not pre-bundle keeps the plugins: a package in optimizeDeps.exclude and the packages it depends on, unless optimizeDeps.include names them (Vite does not pre-bundle what a module it serves out of node_modules imports); a linked package (its real path is outside node_modules); a dependency's .jsx and .tsx files, stylesheets and assets; an import with a query (?raw, ?url, ?worker); and, with optimizeDeps.noDiscovery, every dependency optimizeDeps.include does not name. Under Vite a plugin's transform is also given each pre-bundled file as the page asks for it; there is no such file here, so a plugin that changed a dependency's code in dev that way changes nothing in a pre-bundled dependency. oj build is unchanged: a build runs the plugins on every module, as vite build does.
  • TanStack Start dev: the server listens and accepts connections once the dev server is built and its watcher covers the root, before the client bundle is built, as Vite's does (its listen starts the dependency optimizer and does not wait for it; the requests that need it wait). A request made meanwhile waits for the bundle and is answered then, the document's too. A host that waits for the port (a sandbox's readiness probe) gave up on a large app's cold start, whose bundle took most of a minute, and answered its visitors 502. The address is printed, and a plugin's httpServer hears listening, once requests are answered, as before. With DEBUG=oj:boot the listening line now names the port and a serving line follows the bundle.

Fixed

  • StyleX: a sheet whose rules the locale comparison could not put in one consistent order no longer stops the compiler with a panic in the sort. (#795)