TNS
VOXPOP
Will JavaScript type annotations kill TypeScript?
The creators of Svelte and Turbo 8 both dropped TS recently saying that "it's not worth it".
Yes: If JavaScript gets type annotations then there's no reason for TypeScript to exist.
0%
No: TypeScript remains the best language for structuring large enterprise applications.
0%
TBD: The existing user base and its corpensource owner means that TypeScript isn’t likely to reach EOL without a putting up a fight.
0%
I hope they both die. I mean, if you really need strong types in the browser then you could leverage WASM and use a real programming language.
0%
I don’t know and I don’t care.
0%
Frontend Development / JavaScript / Software Development

Dev News: Deno’s Fresh Updates, New Bun and Whither Gatsby

Fresh, a full-stack web framework for Deno, updates. Also: questions about the future of Gatsby, and Bun's new release preps for version 1.0.
Aug 26th, 2023 5:08am by
Featued image for: Dev News: Deno’s Fresh Updates, New Bun and Whither Gatsby
Photo via Pixabay.

Fresh 1.4 is out. Fresh is a relatively new full-stack web framework for Deno. This update focuses on the overall developer experience. According to Marvin Hagemeister, who leads the project full time, the update includes faster page loads with ahead-of-time compilation, custom HTML, head and body tags, and making it easier to use shared layouts.

Fresh compiles assets on the fly, which Hagemeister noted enables lightning-fast deployments with no build step. But the Fresh team realized that just-in-time rendering with large “islands” was sluggish. (Deno defines islands as “isolated Preact components that are then hydrated on the client within a statically-rendered HTML page.”)

“We arrived at a pre-compile solution that results in assets being served about 45-60x faster for a cold start of a serverless function, with minimal impact on deployment times,” Hagemeister wrote in a blog post on Deno’s website “The savings depend on the size of the island, but even for small ones the improvements are very visible.”

He added that Fresh will always use JIT completion when running the development server, so that the server can respond to the API as quickly as possible without waiting for the asset compilation to finish.

Fresh 1.4 also allows developers to render the HTML document rather than having it create the outer HTML structure, up to the body tag, internally.

The updated Fresh also incorporated support for _layout files, which can be put in any route folder and Fresh will detect all the layouts that match and stack them on top of each other. The example Hagemeister provided is when developers want the header or footer to match across a website.

“Think of the header or footer of a website which is the same component across routes,” he wrote. “Previously, you could do that in routes/_app.tsx, but there was no way to go beyond that. Creating a shared layout for some sub routes in your app required extracting the code into a component and importing it into all routes manually.”

For its next trick, Fresh plans to overhaul its plugin system to make it easier to use.

Whither Gatsby?

It’s been a month since the last commit to Gatsby, the Jamstack framework and platform company, according to its GitHub repository. Fred Schott, the co-creator of the web framework Astro, first noted that there had been no commits in the past 24 days and zero pull requests.

His observation came as a reply to a Twitter thread about Gatsby.

“Is Gatsby dead?” asked Sébastien Lorber, “docusaurus maintainer” at This Week in React. “Not ‘officially’ but its future does not look super promising.”

Netlify, which acquired competitor Gatsby earlier this year, responded to Schott to say that it’s still investing in Gatsby: “Fear not! Gatsby is vital to a great many of our customers. Updates to React 18 and Gatsby Adapters are the most important update, but we’re also busy investing in platform primitives for a stronger Gatsby.js (and other frameworks, too).”

This discussion comes on the heels of a July restructuring at Netlify related to a shift in business focus that is tangentially related to Gatsby.

“Late last year, we made a conscious decision to evolve the business plan to expand beyond our core Netlify product, and introduce a web development platform that serves the needs of not only developers (historically our core audience), but also Enterprise Architects and Marketers,” wrote CEO Mathias Biilmann, in a message to employees on Netlify’s blog.

“As we’ve shared with you in many Kickstart meetings and town halls, we have been building a differentiated vision that is the right one for the long-term success of Netlify. Our acquisitions of Gatsby and Stackbit have been a significant part of this fundamental evolution.”

He added that a priority will be investing in initiatives that further Netlify’s business goals and cease to invest in things that don’t.

“We need to focus on investing in Product and Engineering initiatives that help us solve business problems for the Enterprise that no one else can,” Biilmann wrote.

After that July announcement about restructuring and layoffs, Sam Bhagwat, Gatsby’s co-creator, tweeted, “If you saw the news around the Netlify layoffs yesterday, there are some great ex-Gatsby folks who are looking for a new role.”

Bun 1.0 Release Scheduled

Bun version 0.8.0 is out, with new debugger support and fetch streaming. This version also unblocks SvelteKit. Bun is a JavaScript runtime, bundler, transpiler and package manager.

The project now implements debugger support via WebKit’s Inspector Protocol, according to the release notes. The notes also report that improved support for environment variables in Worker has unblocked SvelteKit, and it recommends scaffolding your project with create-svelte.

Other updates:

  • Support for Nuxt.
  • Fetch response body streaming, which means developers can now stream data from a fetch response, instead of waiting for the entire response to be downloaded.

Bun 1.0 is set to launch Sept. 7.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Deno.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.