Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@types/mkdirp": "1.0.2",
"@types/node": "16.11.58",
"@types/yargs": "15.0.14",
"execa": "6.1.0",
"execa": "5.1.1",
"jest": "28.1.3",
"rimraf": "3.0.2",
"ts-jest": "28.0.8",
Expand Down
4 changes: 2 additions & 2 deletions src/commands/build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as assert from "assert";
import { execa, ExecaReturnValue } from "execa";
import execa from "execa";
import * as fse from "fs-extra";
import globby from "globby";
import pLimit from "p-limit";
Expand Down Expand Up @@ -66,7 +66,7 @@ function compilerOptionsToArgs(
return args;
}

function assertTypeScriptBuildResult(result: ExecaReturnValue<string>) {
function assertTypeScriptBuildResult(result: execa.ExecaReturnValue<string>) {
if (result.exitCode !== 0) {
console.log("TypeScript compiler exited with non-zero exit code.");
console.log(result.stdout);
Expand Down
4 changes: 2 additions & 2 deletions src/commands/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createCommand } from "../command";
import { presetFields } from "./bootstrap";
import path from "path";
import pLimit from "p-limit";
import { execa, ExecaChildProcess } from "execa";
import execa from "execa";
import { getRootPackageJSON } from "../utils/get-root-package-json";
import { getWorkspaces } from "../utils/get-workspaces";
import { getWorkspacePackagePaths } from "../utils/get-workspace-package-paths";
Expand Down Expand Up @@ -351,7 +351,7 @@ const timeout = `;setTimeout(() => { throw new Error("The Node.js process hangs.
function runRequireJSFileCommand(args: {
cwd: string;
path: string;
}): ExecaChildProcess<string> {
}): execa.ExecaChildProcess<string> {
return execa("node", ["-e", `require('${args.path}')${timeout}`], {
cwd: args.cwd,
reject: false,
Expand Down
12 changes: 6 additions & 6 deletions test/integration.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from "path";
import { execa } from "execa";
import execa from "execa";
import * as fse from "fs-extra";

jest.setTimeout(10_000);
Expand All @@ -10,7 +10,7 @@ const binaryFolder = path.join(__dirname, "..", "dist", "index.js");
it("can bundle a simple project", async () => {
await fse.remove(path.resolve(fixturesFolder, "simple", "dist"));
const result = await execa("node", [binaryFolder, "build"], {
cwd: path.resolve(fixturesFolder, "simple"),
cwd: path.resolve(fixturesFolder, "simple")
});
expect(result.exitCode).toEqual(0);
const baseDistPath = path.resolve(fixturesFolder, "simple", "dist");
Expand Down Expand Up @@ -93,7 +93,7 @@ it("can bundle a simple project", async () => {
}"
`);
await execa("node", [binaryFolder, "check"], {
cwd: path.resolve(fixturesFolder, "simple"),
cwd: path.resolve(fixturesFolder, "simple")
});
});

Expand All @@ -105,7 +105,7 @@ it("can build a monorepo project", async () => {
path.resolve(fixturesFolder, "simple-monorepo", "b", "dist")
);
const result = await execa("node", [binaryFolder, "build"], {
cwd: path.resolve(fixturesFolder, "simple-monorepo"),
cwd: path.resolve(fixturesFolder, "simple-monorepo")
});
expect(result.exitCode).toEqual(0);
const baseDistAPath = path.resolve(
Expand Down Expand Up @@ -327,14 +327,14 @@ it("can build a monorepo project", async () => {
`);

await execa("node", [binaryFolder, "check"], {
cwd: path.resolve(fixturesFolder, "simple-monorepo"),
cwd: path.resolve(fixturesFolder, "simple-monorepo")
});
});

it("can build an esm only project", async () => {
await fse.remove(path.resolve(fixturesFolder, "simple-esm-only", "dist"));
const result = await execa("node", [binaryFolder, "build"], {
cwd: path.resolve(fixturesFolder, "simple-esm-only"),
cwd: path.resolve(fixturesFolder, "simple-esm-only")
});
expect(result.exitCode).toEqual(0);

Expand Down
2 changes: 1 addition & 1 deletion test/ts-tests/run-tests.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { execa } from "execa";
import execa from "execa";
import path from "node:path";
import { fileURLToPath } from "node:url";

Expand Down
58 changes: 2 additions & 56 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1809,22 +1809,7 @@ estree-walker@^2.0.1:
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==

execa@6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20"
integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.1"
human-signals "^3.0.1"
is-stream "^3.0.0"
merge-stream "^2.0.0"
npm-run-path "^5.1.0"
onetime "^6.0.0"
signal-exit "^3.0.7"
strip-final-newline "^3.0.0"

execa@^5.0.0:
execa@5.1.1, execa@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
Expand Down Expand Up @@ -2020,7 +2005,7 @@ get-package-type@^0.1.0:
resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a"
integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==

get-stream@^6.0.0, get-stream@^6.0.1:
get-stream@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
Expand Down Expand Up @@ -2145,11 +2130,6 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

human-signals@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5"
integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==

iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down Expand Up @@ -2345,11 +2325,6 @@ is-stream@^2.0.0:
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==

is-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac"
integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==

is-string@^1.0.5, is-string@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd"
Expand Down Expand Up @@ -3005,11 +2980,6 @@ mimic-fn@^2.1.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==

mimic-fn@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc"
integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==

min-indent@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
Expand Down Expand Up @@ -3114,13 +3084,6 @@ npm-run-path@^4.0.1:
dependencies:
path-key "^3.0.0"

npm-run-path@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00"
integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==
dependencies:
path-key "^4.0.0"

object-assign@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
Expand Down Expand Up @@ -3160,13 +3123,6 @@ onetime@^5.1.2:
dependencies:
mimic-fn "^2.1.0"

onetime@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4"
integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==
dependencies:
mimic-fn "^4.0.0"

os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
Expand Down Expand Up @@ -3255,11 +3211,6 @@ path-key@^3.0.0, path-key@^3.1.0:
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==

path-key@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18"
integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==

path-parse@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
Expand Down Expand Up @@ -3717,11 +3668,6 @@ strip-final-newline@^2.0.0:
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==

strip-final-newline@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd"
integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==

strip-indent@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001"
Expand Down