From 9d59b715b54ab7134f981d42e828bfa9e073af4a Mon Sep 17 00:00:00 2001 From: "K.J. Valencik" Date: Mon, 23 Sep 2024 11:24:37 -0400 Subject: [PATCH] fix(create-neon): Render diagnostics to stderr in cargo build --- pkgs/create-neon/package.json | 2 +- pkgs/create-neon/src/create/app.ts | 6 ++++-- pkgs/create-neon/src/create/lib.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/create-neon/package.json b/pkgs/create-neon/package.json index 3a5d87280..6b2796e7e 100644 --- a/pkgs/create-neon/package.json +++ b/pkgs/create-neon/package.json @@ -1,6 +1,6 @@ { "name": "create-neon", - "version": "0.5.1", + "version": "0.5.2", "description": "Create Neon projects with no build configuration.", "type": "module", "exports": "./dist/src/bin/create-neon.js", diff --git a/pkgs/create-neon/src/create/app.ts b/pkgs/create-neon/src/create/app.ts index cfd3f58d5..e21c86878 100644 --- a/pkgs/create-neon/src/create/app.ts +++ b/pkgs/create-neon/src/create/app.ts @@ -8,8 +8,10 @@ export class AppCreator extends Creator { scripts(): Record { return { test: "cargo test", - "cargo-build": "cargo build --message-format=json > cargo.log", - "cross-build": "cross build --message-format=json > cross.log", + "cargo-build": + "cargo build --message-format=json-render-diagnostics > cargo.log", + "cross-build": + "cross build --message-format=json-render-diagnostics > cross.log", "postcargo-build": "neon dist < cargo.log", "postcross-build": "neon dist -m /target < cross.log", debug: "npm run cargo-build --", diff --git a/pkgs/create-neon/src/create/lib.ts b/pkgs/create-neon/src/create/lib.ts index 8cb36c25c..59931a463 100644 --- a/pkgs/create-neon/src/create/lib.ts +++ b/pkgs/create-neon/src/create/lib.ts @@ -95,8 +95,8 @@ export class LibCreator extends Creator { let scripts: Record = { test: `${tscAnd}cargo test`, - "cargo-build": `${tscAnd}cargo build --message-format=json > cargo.log`, - "cross-build": `${tscAnd}cross build --message-format=json > cross.log`, + "cargo-build": `${tscAnd}cargo build --message-format=json-render-diagnostics > cargo.log`, + "cross-build": `${tscAnd}cross build --message-format=json-render-diagnostics > cross.log`, "postcargo-build": "neon dist < cargo.log", "postcross-build": "neon dist -m /target < cross.log", debug: "npm run cargo-build --",