July 12th, 2024

Deno 1.45: Workspace and Monorepo Support

Deno 1.45 introduces workspace and monorepo support, enhances Node.js compatibility, updates deno install, deprecates deno vendor, and more. Improved dependency management and configuration sharing streamline development workflows.

Read original articleLink Icon
Deno 1.45: Workspace and Monorepo Support

Deno 1.45 introduces workspace and monorepo support, simplifying dependency management and configuration sharing. It also enhances Node.js compatibility, updates deno install, deprecates deno vendor, and more. Workspaces can be Deno-first or npm-based, allowing easy configuration and member package overrides. Node-API support and various Node.js compatibility improvements have been implemented. A new --frozen flag ensures lockfile consistency, deno install updates mimic npm workflows, and npm lifecycle scripts are now supported. Deno init --lib facilitates library setup, while deno vendor is deprecated in favor of --vendor usage. Deno test now automatically discovers test files, and Blob.bytes() is supported for Web File API compliance. Jupyter notebooks gain prompt and confirm API, and deno compile now supports --env flag for embedding environmental variables. Users are encouraged to upgrade and explore these new features for improved development workflows.

Related

NPM and NodeJS should do more to make ES Modules easy to use

NPM and NodeJS should do more to make ES Modules easy to use

Boris Cherny discusses challenges with ES Modules in NodeJS and NPM, proposing solutions like simplifying file extensions, upgrading libraries, and phasing out CommonJS support in NodeJS to boost adoption rates.

AdonisJS

AdonisJS

AdonisJS is a TypeScript-first web framework for Node.js, emphasizing type-safety, intellisense, and performance. It offers testing support, official packages like Lucid for SQL ORM, Auth for authentication, and a vibrant community.

Speeding up the JavaScript ecosystem – Isolated Declarations

Speeding up the JavaScript ecosystem – Isolated Declarations

TypeScript's new isolated declaration feature in version 5.5 simplifies packaging, reduces type definition file creation time to less than a second, eliminates manual *.d.ts file creation, and enables easy code sharing without npm packaging complexities. This innovation enhances code-sharing efficiency and streamlines .d.ts file generation by requiring explicit return types for exported functions, revolutionizing the packaging and sharing process for developers.

Simple notes for Emacs with an efficient file-naming scheme

Simple notes for Emacs with an efficient file-naming scheme

The Denote package for Emacs by Protesilaos Stavrou simplifies note-taking with structured file names, emphasizing predictability, flexibility, and integration with other packages. It promotes clear naming conventions and customizable workflows.

Automate Project Environments with Devbox and Direnv

Automate Project Environments with Devbox and Direnv

The article emphasizes the benefits of isolated project environments and introduces Devbox and Direnv as tools to automate environment management. It explains their features, integration, and simplification of setting up project environments.

Link Icon 5 comments
By @IshKebab - 8 months
Deno is so nice for infrastructure scripting in projects. I tried to convince my company to use it but apparently one `curl` line to install it was too much to ask so now I spend half my time fighting Python, setting up venvs, working around pip bugs, etc. Yeay.
By @worldsayshi - 8 months
I'm currently working in a pnpm monorepo and it really seems like a potential double edged sword. On the one hand I have longed for better support for local packages in the ecosystem (which pnpm does provide, and I'm happy for it). But some weird edge cases seem to arise. Like serverless functions not being supported[1]. I suppose that's just a matter of feature maturity.

The more design-level hazard of this might be that it's easier to build monorepos where everything is tightly coupled. And you end up with something that is like a single package with extra abstraction layers.

1 - https://github.com/pnpm/pnpm/issues/6259

By @ethegwo - 8 months
In my last job, I tried using a monorepo approach, merging about 50 microservices into a single repository. After several months of growth, the size of the entire git repository reached over 100GB. We had to create monthly checkpoints (.tar.gz) to facilitate faster time traveling or quick cloning for new team members. This experience taught me that perhaps git is not the best tool for managing a monorepo.
By @bovermyer - 8 months
I wonder how this works with things like dependency management; for example, Nx lets you build all affected projects when you change one dependency's files in a monorepo. Does this do something similar?