Skip to content

cli v1.0.4

Choose a tag to compare

@github-actions github-actions released this 04 Dec 02:27
83d5fe3

Patch Changes

  • Declare Bun 1.4.3 as the minimum supported Bun version in engines. Upgrade Bun to 1.4.3 or later before updating if you run Remix on Bun. (#12367)

  • The bundled Remix agent skill in remix new apps now includes guidance for translating modern web-platform patterns into idiomatic Remix and recommends pairing with Google Chrome's Modern Web Guidance skill. (#12418)

  • Apps created with remix new now keep the starter welcome page SVGs in public/remix-wordmark.svg and public/welcome-icons.svg instead of inlining them in app/actions/home-page.tsx and app/actions/public/prompt-button.tsx, and simplify the starter CSS and PromptButton component. The generated AGENTS.md also notes which starter files are safe to replace and summarizes the clientEntry interactive component model. (#12478)

  • New apps created with remix new report HMR port conflicts without starting the app server, avoiding a secondary EPIPE error from the child process. Existing apps can apply the same startup and shutdown changes in hmr.ts: (#12472)

    --- a/hmr.ts
    +++ b/hmr.ts
    @@ -1 +1,2 @@
    +import { once } from 'node:events'
     import * as http from 'node:http'
    @@ -12,35 +13,47 @@
    
    -const hmrRunner = run('server.ts', {
    -  env: {
    -    ...process.env,
    -    PORT: String(appPort),
    -    HMR_PROXY_PORT: String(hmrProxyPort),
    -  },
    -  nodeArgs: ['--import', 'remix/node-tsx', '--import', 'remix/component-hmr/node'],
    -  browserHmrChannel: { port: hmrEventPort },
    -})
    -
    -const server = http.createServer(
    -  createRequestListener(
    -    createHmrReadyFetch(
    -      hmrRunner,
    -      createFetchProxy(`http://127.0.0.1:${appPort}`, {
    -        xForwardedHeaders: true,
    -      }),
    -    ),
    -  ),
    -)
    -
    -server.listen(hmrProxyPort, '127.0.0.1')
    +const server = http.createServer()
    
     let shuttingDown = false
    +let hmrRunner: ReturnType<typeof run> | undefined
    
    -function shutdown() {
    +process.on('SIGINT', () => shutdown())
    +process.on('SIGTERM', () => shutdown())
    +
    +try {
    +  server.listen(hmrProxyPort, '127.0.0.1')
    +  await once(server, 'listening')
    +
    +  if (!shuttingDown) {
    +    hmrRunner = run('server.ts', {
    +      env: {
    +        ...process.env,
    +        PORT: String(appPort),
    +        HMR_PROXY_PORT: String(hmrProxyPort),
    +      },
    +      nodeArgs: ['--import', 'remix/node-tsx', '--import', 'remix/component-hmr/node'],
    +      browserHmrChannel: { port: hmrEventPort },
    +    })
    +
    +    server.on(
    +      'request',
    +      createRequestListener(
    +        createHmrReadyFetch(
    +          hmrRunner,
    +          createFetchProxy(`http://127.0.0.1:${appPort}`, {
    +            xForwardedHeaders: true,
    +          }),
    +        ),
    +      ),
    +    )
    +  }
    +} catch (error) {
    +  console.error(`Failed to start HMR on http://127.0.0.1:${hmrProxyPort}:`, error)
    +  shutdown(1)
    +}
    +
    +function shutdown(exitCode = 0) {
       if (shuttingDown) return
       shuttingDown = true
    -  server.close(() => hmrRunner.close().finally(() => process.exit(0)))
    +  server.close(() => Promise.resolve(hmrRunner?.close()).finally(() => process.exit(exitCode)))
       server.closeAllConnections()
     }
    -
    -process.on('SIGINT', shutdown)
    -process.on('SIGTERM', shutdown)
  • Apps created with remix new now start their Node.js server with serve() from remix/node-fetch-server. Outside development, shutdown on SIGINT or SIGTERM closes idle and speculative connections immediately while allowing active requests up to 30 seconds to finish before force-closing remaining connections and closing the asset server; development shutdown continues to close connections immediately. (#12494)

  • Bumped @remix-run/* dependencies: