Skip to content

Commit

Permalink
Merge pull request #1071 from neon-bindings/kv/render-diagnostics
Browse files Browse the repository at this point in the history
fix(create-neon): Render diagnostics to stderr in cargo build
  • Loading branch information
kjvalencik authored Sep 23, 2024
2 parents 1af433d + 9d59b71 commit e281554
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkgs/create-neon/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 4 additions & 2 deletions pkgs/create-neon/src/create/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ export class AppCreator extends Creator {
scripts(): Record<string, string> {
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 --",
Expand Down
4 changes: 2 additions & 2 deletions pkgs/create-neon/src/create/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export class LibCreator extends Creator {

let scripts: Record<string, string> = {
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 --",
Expand Down

0 comments on commit e281554

Please sign in to comment.