An extremely opinionated TypeScript monorepo tool.

Related tags

Messaging uni
Overview

Unirepo

Unirepo is an extremely opinionated TypeScript build tool.

Typical monorepo management tools in the Node.js ecosystem provide automation around package maintenance, but still permit and require users to muck around with poly-package configuration. Package boundaries must be manually maintained, each with its own sub-configuration.

Unirepo is different because sub-package configuration is managed centrally and uniformly. Package boundaries are managed automatically via bundling and code splitting.

You will have one and only one list of dependencies. Your package.json files will be generated from that source configuration. Same for tsconfig.json. The source configuration file that - believe it or not - allows code comments.

Unirepo is fast because it is ships as a native binary and builds your code using esbuild.

Additionally, Unirepo has a run subcommand that acts as a substitute for ts-node. The run subcomain also supports a --watch flag, and so acts as a substitute for node-dev (or ts-node-dev) as well. Sourcemaps are always enabled.

As mentioned, Unirepo is extremely opinionated. Those opinions will evolve in to documentation, including a a growing list of anti-features.

Want to see it in action? Check out the Demo Video!

Status

Alpha! Don't use this yet.

See the versioning guide and the roadmap.

Only works for targeting Node currently. Targeting Browsers is planned.

Installation

go get -u github.com/deref/uni

Usage

Setup

  1. Create a uni.yml file with some package entrypoints.
  2. Manually add dependencies to your config file.
  3. Run uni deps.

Development

  • Use uni run src/program.ts to execute programs. They must export a main function.
  • Use uni build some-package to pre-compile into out/dist.

Publishing

Here's the steps to do in your CI flow:

  1. uni build --version $VERSION to create packages with version numbers.
  2. uni pack to create packed .tgz files.
  3. uni publish to automate npm publish ./path/to/package.tgz.

Other Features

Patching

The patch-package utility is always available.

Engine Checking

Functionality similar to check-engine is builtin, but much faster and with caching.

Executables

Any runnable script can be exposed as an executable in a package. A shim script (with a #!) will be produced automatically.

Issues
  • "main is not a function" with useless call stack

    I'm trying to switch from ts-node. To narrow down the issue I've deleted basically everything from my project

    First I've built uni in my cloned copy at ~/dev/uni

    My code is this branch here: https://github.com/AvenCloud/cloud/tree/uni-testing

    I attempt to run ~/dev/uni/uni run lib/server/server.ts, and I see this unexplainable error- my code has no reference to "main"

    Screen Shot 2021-02-22 at 8 56 49 AM

    At an earlier time, I saw a lib_uv error(!). But that was before I stripped down my reproduction example.

    Usually I specify a custom tsconfig.json (tsconfig.server.json, while nextjs uses tsconfig.json).. and I couldn't figure out how to do that with uni.

    opened by ericvicenti 6
  • Contributing

    Contributing

    I'm really chuffed about this repo. Currently, I'm learning golang and wanted to contribute to uni to expand my knowledge and help that amazing repo. Are there any guidelines and requirements to contribute?

    opened by Aslemammad 5
  • Feature workspace

    Feature workspace

    Hi man, this PR is a feature proposal. The mixed dependence is a interesting proposal but, by my self, I prefer yarn workspaces.

    But configure and manage a Yarn workspace with Typescript is boring. That proposal use the simplicity of uni.yml to configure a entire Yarn Workspace with TypeScript, Jest and Lint by replacing index property to folder property. All of your code still compatible.

    All unis created files like package.json, tsconfig, jest.config, eslintrc files are in .gitignore because uni.yml will generante them

    things to do:

    • [ ] A initoption to guid developer create uni.yml
    • [ ] Allow tsconfig.json settings changed by dev
    • [ ] Options to configure importante parameters like minimal test coverage (currently is fixed in 90%)
    • [ ] more uni tests and examples
    • [ ] husky
    • [ ] ...

    I'll continue helping that amazing project. I hope you like that idea.

    Extra: This PR also have VSCode devcontainer suggestion. Maybe itcan facility bring new contributors to uni team.

    opened by teintinu 2
  • Build watch

    Build watch

    Closes #6

    @BenElgar Could you please give this branch a try and make sure that (A) it does what you expect it to do and (B) it doesn't break existing run/watch/build use cases? If so, feel free to merge & upgrade our dependency on unirepo in the other Deref repo.

    opened by brandonbloom 1
  • Graceful shutdown

    Graceful shutdown

    This PR does 3 things:

    • Cause the child process to be stopped with SIGTERM instead of SIGKILL. SIGKILL is still sent if the process has not stopped after a fixed period.
    • Start the child process in its own process group so that stopping the child will also stop any of its owned processes.
    • Intercept SIGKILL/SIGTERM in uni itself and trigger a shutdown of its child process

    Resolves #10

    opened by kendru 1
  • Attempt to stop child process gracefully

    Attempt to stop child process gracefully

    When uni exits or reloads the child process on rebuild, it should try to terminate the process with a SIGTERM rather than a SIGKILL in case there is any cleanup that needs to happen. Additionally, it should not orphan any processes started by the subprocess itself.

    opened by kendru 0
Owner
Deref
Deref
An opinionated package that helps you print user-friendly output messages from your Go command line applications.

github.com/eth-p/clout (Command Line Output) clout is a package that helps you print user-friendly output messages from your Go command line applicati

Ethan P. 4 Jan 15, 2022
A little opinionated program to automatically provision my Aerohive APs without HiveManager/ExtremeCloud IQ

Aerohive Provision A little opinionated program to automatically provision my Aerohive APs without HiveManager/ExtremeCloud IQ. Unfortunately a lot of

Lachlan Davidson 2 Nov 29, 2021
đŸ”„ A fast and beautiful command line tool to build API requests.

Poodle A fast and beautiful command line tool to build API requests ?? Check out the full Demo! Poodle is an interactive command line tool to build an

Ahmed 135 May 1, 2022
CLI Tool to Stress Apache Kafka Clusters

Kafka Stress - Stress Test Tool for Kafka Clusters, Producers and Consumers Tunning Installation Docker docker pull fidelissauro/kafka-stress:latest d

Matheus Fidelis 26 Mar 19, 2022
Golang module/tool for decoding proto buffer without message definition.

Golang module/tool for decoding proto buffer without message definition.

null 32 Jun 23, 2022
Golang tool to send notifications to LINE app

Golang tool to send notifications to LINE app

Muhammad Daffa 3 Dec 15, 2021
Kafka producer and consumer tool in protobuf format.

protokaf Kafka producer and consumer tool in protobuf format. Features Consume and produce messages using Protobuf protocol Trace messages with Jaeger

SberMarket Tech 110 Jun 6, 2022
Kafka tool to emit tombstones for messages based on header value matches

Langolier Langolier is a CLI tool to consume a Kafka topic and emit tombstones for messages matched by header name/value pairs. Usage Usage of langoli

jsd1982 2 Sep 22, 2021
A CLI tool for interacting with Kafka through the Confluent Kafka Rest Proxy

kafkactl Table of contents kafkactl Table of contents Overview Build Development Overview kafkactl is a CLI tool to interact with Kafka through the Co

Alexandre Barone 0 Nov 1, 2021
Tool for collect statistics from AMQP (RabbitMQ) broker. Good for cloud native service calculation.

amqp-statisticator Tool for collect statistics around your AMQP broker. For example RabbitMQ expose a lot information trought the management API, but

Jan Seidl 0 Dec 13, 2021
Sim - Command-line tool to manage program symlinks in $XDG_BIN_HOME.

Sim Sim is a command-line tool that manages program symlinks in $XDG_BIN_HOME. Get started Run make install. Make sure your PATH contains $XDG_BIN_HOM

Mitchell Kember 0 Jan 3, 2022
CLI tool for generating random messages with rules & publishing to the cloud services (SQS,SNS,PUB/SUB and etc.)

Randomsg A CLI tool to generate random messages and publish to cloud services like (SQS,SNS,PUB/SUB and etc.). TODO Generation of nested objects is no

Kerem Dokumacı 5 May 10, 2022
An extremely opinionated TypeScript monorepo tool.

Unirepo Unirepo is an extremely opinionated TypeScript build tool. Typical monorepo management tools in the Node.js ecosystem provide automation aroun

Deref 224 Jun 10, 2022
protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript clients that connect the web frontend and golang backend fronted by grpc-gateway.

protoc-gen-grpc-gateway-ts protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript

gRPC Ecosystem 70 Jul 5, 2022
Template repository for a Go monorepo, complete with CI and automatic docker builds

Utility Warehouse template Go monorepo This repo is an abbreviated copy of one used by one of the teams inside Utility Warehouse. It's been built for

UW Labs 45 Jun 12, 2022
The Monogon Project Monorepo. May contain traces of peanuts and a pure Go Linux userland.

This is the main repository containing the source code for the Monogon Project.

null 38 Jun 8, 2022
Monorepo implementing the Optimistic Ethereum protocol

The Optimism Monorepo TL;DR This is the primary place where Optimism works on stuff related to Optimistic Ethereum. Documentation Extensive documentat

OMG Network 37 Jun 13, 2022
Monorepo for Boundary UIs and addons.

Boundary UI Monorepo This monorepo contains multiple projects, including UIs and addons, used by Boundary. This top-level repository provides limited

HashiCorp 61 Jun 6, 2022
GitHub Actions demo for a monorepo Go project

GitHub Actions demo for a monorepo Go project The purpose of this repository is to demonstrate using a GitHub action as a pull request status check in

Kalin Arsov 1 Oct 31, 2021
L2 D O - The Optimism Monorepo With Golang

The Optimism Monorepo TL;DR This is where Optimism gets built. Documentation Ext

Debris Protocol 0 Jan 19, 2022
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching.

Trie Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching. Usage Create a Trie with: t := trie.New() Add Keys with:

Derek Parker 592 Jun 24, 2022
RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue

RapidMQ RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue in the Go programming langu

Vadim Shakun 63 Apr 24, 2022
Extremely flexible golang deep comparison, extends the go testing package and tests HTTP APIs

go-testdeep Extremely flexible golang deep comparison, extends the go testing package. Latest news Synopsis Description Installation Functions Availab

Maxime Soulé 307 Jul 4, 2022
An extremely fast UUID alternative written in golang

Overview WUID is a globally unique number generator, while it is NOT a UUID implementation. WUID is 10-135 times faster than UUID and 4600 times faste

Edwin 466 Jun 27, 2022
An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.

ozzo-routing You may consider using go-rest-api to jumpstart your new RESTful applications with ozzo-routing. Description ozzo-routing is a Go package

Ozzo Framework 438 Jun 15, 2022
An extremely fast UUID alternative written in golang

Overview WUID is a globally unique number generator, while it is NOT a UUID implementation. WUID is 10-135 times faster than UUID and 4600 times faste

Edwin 11 May 10, 2021
An extremely fast JavaScript bundler and minifier

An extremely fast JavaScript bundler and minifier

Evan Wallace 32.3k Jul 4, 2022
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite

go-testdeep Extremely flexible golang deep comparison, extends the go testing package. Latest news Synopsis Description Installation Functions Availab

Maxime Soulé 305 Jun 29, 2022
(WIP) Extremely simple unixway GitHub webhook listener for push event

(WIP) puffy Puffy is an extremely simple unixway GitHub webhook listener and handler for push events Todo Add payload signature validation (WIP) Depen

Egor 3 Dec 30, 2021