Urgent.News

What's breaking now, across thousands of outlets.

Tech

Say which projects may depend on which

A UI kit that imports a checkout flow, or an app that reaches into a helper it should not see, is easy to add and hard to remove. Tag the layers, write the rules once, and vx lock holds every change to them. Tags and rules A project names its tags in its own config: // packages/button/vx.config.ts import { defineProject } from ' @vzn/vx/config ' export default defineProject ({ tags : [ ' type:ui…

A UI kit that imports a checkout flow or an app that relies on a helper it should not see is simple to add, yet difficult to remove. Assign tags to the layers and establish the rules once, then lock them. These tags and rules are stored in a project's own configuration file. The workspace defines what each tag can depend on, using selectors such as tag: glob or project-name glob.

The workspace rules specify dependencies, allowing projects to depend on tags like tag:type:app or tag:type:ui, while denying dependencies like tag:type:app or tag:type:feature. If a project has no selected rules, it remains free. The vx lock tool checks the workspace dependencies and workspace rules, refusing any graph that violates the rules, listing every broken dependency and writing nothing.

To resolve the issue, either drop the dependency or adjust the project tags or rules. Once the lock is set, it remains unchanged, so a pull request that introduces a forbidden dependency will fail the test. Runs do not verify these rules; instead, they use the locked configurations from the lock file, which have already passed the checks.

In NX, the @nx/enforce-module-boundaries lint rule reads the depConstraints from the root ESLint config and fills in the workspace rules when none are set. This process creates the workspace rules, which then replace the original rules. However, Nx's lint rule checks source imports, while vx checks the dependencies declared by the projects.

The vx-migrate README also notes other constraints that vx does not check, such as allSourceTags, /regex/ tags, and constraints that only ban external imports. The schema for these configurations can be found in the configuration reference.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Null Is Not Zero: What an MCP Tool Description Has to Carry

A REST API's documentation is read by a developer once. An MCP tool description is the one piece of text a model reads on every single call, which makes it where you stop an agent misreporting your…

  • MCP tool description crucial for model's accuracy
  • Null ROI not zero, score not return, negative numbers correct
  • Guardrails in descriptions prevent incorrect data summarization

My first DEV Post

🚀 Starting My Developer Journey: Learning, Building, and Growing Hey everyone! 👋 I'm a B.Tech student passionate about software development, Artificial Intelligence, and Machine Learning.

GitHub contribution graphs as pixel art: a small browser project

I built GitPixelPush to turn a GitHub contribution calendar into a drawing canvas. It is a creative experiment: the generated activity is clearly labeled artwork.

  • GitPixelPush transforms GitHub contribution calendar into pixel art canvas
  • Users can sketch patterns, stamp text, or use preset options
  • Backdated empty commits created in chosen repository for visual representation

More from Wednesday 14 October →