Repository navigation
v0.27.0
Breaking changes
-
The gem dependency context model moved into one
Proscenium::Contextsnamespace, underlib/proscenium/contexts/. The old constants and require paths are removed, with no aliases. Only code that reached into these internals directly is affected:Removed constant Removed require path Now Proscenium::ContextMapproscenium/context_mapProscenium::Contexts::MapProscenium::StaleContextsproscenium/stale_contextsProscenium::Contexts::StaleProscenium::DependencyContextproscenium/dependency_contextProscenium::Contexts::ProjectionProscenium::MappingGenerationproscenium/mapping_generationProscenium::Contexts::MappingGenerationProscenium::CLI::Contextsproscenium/cli/contextsProscenium::Contexts::PlanProscenium::CLI::Rulesproscenium/cli/rulesProscenium::Contexts::RulesProscenium::CLI::Error::CATALOGProscenium::Contexts::Messages::TEXT(message and fix) andProscenium::CLI::Error::STATUS(exit status)require 'proscenium'loads the whole namespace, so an app that only requires the gem needs no change. -
Proscenium::Middleware::BuildErroris removed. Nothing ever raised it: every build error isProscenium::Builder::BuildError. Arescue_from Proscenium::Middleware::BuildErrornow raisesNameErrorwhen it loads, so rescueProscenium::Builder::BuildErrorinstead.
Fixes
Puma preload_app!
- Naming a
Proscenium::Builderconstant no longer starts the Go runtime. Only the first actual build does. Arescue_from Proscenium::Builder::BuildErrorin a controller loaded while Puma boots withpreload_app!started Go before the fork, and Go cannot survive a fork (golang/go#15538), so the forked worker hung on its first build.
Tag helpers
javascript_include_tagandstylesheet_link_tagfind a precompiled source in the manifest. The lookup missed every time, sojavascript_include_tag 'app/components/x'served the undigested source URL, and a gem source rendered an array intosrc.- A gem source with no manifest entry, as in development, gets its
/node_modules/@rubygems/...URL. It rendered/@rubygems/..., which nothing serves.
CSS
- A stylesheet comes out as written, apart from the mixins it expands. Every stylesheet was written back by an old tokenizer, which turned an escaped leading digit into a control character: Tailwind's
.\32xl\:text-lg(2xl:) became.\2xl…and silently matched nothing. Single quotes, CRLF line endings and form feeds were rewritten too. Mixins are now expanded over esbuild's own lexer, and theriking/cssparsedependency is gone. - A mixin file saved mid-edit is refused with a warning, instead of breaking every stylesheet that uses it. A definition the file never closes, such as one ending inside an open comment,
url(or escape, ran on into each stylesheet including the mixin and swallowed the rest of it.
Imports from a gem
-
A bare import from a gem's files follows one lookup order, bounded to the gem and app roots:
- a gem with a dependency context resolves from that context only;
- a package the gem lists in
peerDependenciesresolves from the app first, so a gem developed locally with its own React installed still gets the app's; - the gem's own source looks in the nearest
node_modulesup to the gem root, then the app root; - a file of a package the gem ships resolves beside that package first, then from the app root.
The old
node_modules/@rubygems/<gem>npm-installed layout is no longer looked up. -
A module that a package's
browserfield disables now bundles as an empty module, instead of failing the build.
proscenium install --frozen
install --frozennames the same cause for a stale context as the engine andinspectdo. It said "its NPM dependencies changed" for a context edited by hand, or one whose only change was an editedprojectionSha256.
Public API
- README's new "Extending Proscenium" section lists the API component gems build on, and the protocol the engine calls back into, each part now tagged
@api publicand tested.
Documentation
- Files under
/vendorare served as they are, without building, underCache-Control: public, max-age=3155695200, immutable. README now says so, and that each vendored file needs a version in its path that changes when the file does.