Skip to content

Commit

Permalink
Fix build.mjs
Browse files Browse the repository at this point in the history
See <nodejs/node#52554>.

Signed-off-by: William So <[email protected]>
  • Loading branch information
polyipseity committed Jun 6, 2024
1 parent 93e9d47 commit 8a725f7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-tables-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@polyipseity/obsidian-plugin-library": patch
---

Fix `build.mjs`. See <https://github.com/nodejs/node/issues/52554>.
11 changes: 8 additions & 3 deletions build/build.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { PACKAGE_ID, PATHS } from "./util.mjs"
import { analyzeMetafile, context, formatMessages } from "esbuild"
import { argv, platform } from "node:process"
import { constant, isEmpty, kebabCase } from "lodash-es"
import { argv } from "node:process"
import { copy } from "esbuild-plugin-copy"
import cssEscape from "css.escape"
import esbuildCompress from "esbuild-compress"
import esbuildSvelte from "esbuild-svelte"
import { nodeExternalsPlugin } from "esbuild-node-externals"
import shq from "shq"
import { spawn } from "node:child_process"
import sveltePreprocess from "svelte-preprocess"
import which from "which"
Expand Down Expand Up @@ -120,7 +121,7 @@ async function tsc() {
const npx = await which("npx", {})
return new Promise((resolve, reject) => {
spawn(
npx,
platform === "win32" ? `"${npx}"` : shq(npx),
[
"--package",
"typescript",
Expand All @@ -129,7 +130,11 @@ async function tsc() {
"--emitDeclarationOnly",
...DEV ? ["--watch"] : [],
],
{ stdio: "inherit" },
{
// https://github.com/nodejs/node/issues/52554
shell: true,
stdio: "inherit",
},
)
.once("error", reject)
.once("exit", (code, signal) => {
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"obsidian": "~1.2.8",
"p-lazy": "^4.0.0",
"semver": "^7.6.2",
"shq": "^1.0.3",
"source-map": "^0.7.4",
"svelte": "^3.59.2",
"ts-deepmerge": "^7.0.0",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a725f7

Please sign in to comment.