Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop cross-spawn-promise. It's not maintained #2665

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions packages/ndla-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
"src"
],
"dependencies": {
"cross-spawn": "^7.0.3",
"cross-spawn-promise": "^0.10.2",
"cross-spawn": "^7.0.6",
"fast-glob": "^3.3.2",
"normalize-url": "^8.0.1",
"url-regex-safe": "^4.0.0",
"vercel": "^33.6.2"
},
"devDependencies": {
"@types/cross-spawn": "^6.0.6"
},
"publishConfig": {
"access": "public"
}
Expand Down
8 changes: 4 additions & 4 deletions packages/ndla-scripts/src/scripts/vercel-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/* eslint-disable no-console */

import { inspect } from "util";
import spawn from "cross-spawn-promise";
import { spawnSync } from "child_process";
gunnarvelle marked this conversation as resolved.
Show resolved Hide resolved
import normalizeUrl from "normalize-url";
import urlRegex from "url-regex-safe";

Expand Down Expand Up @@ -127,7 +127,7 @@ async function spawnAlias(sha, deployUrl) {
const cliArgs = ["--token", vercelToken, "alias", "set", deployUrl, newUrl];
safeLog("spawning shell with command:", `vercel ${cliArgs.join(" ")}`);
try {
await spawn("vercel", cliArgs, { encoding: "utf8" });
spawnSync("vercel", cliArgs, { encoding: "utf8" });
} catch (error) {
onError(sha, error);
throw error;
Expand All @@ -139,8 +139,8 @@ async function spawnDeploy(sha) {
const cliArgs = ["--token", vercelToken, "--regions", "dub1", "--yes", ...providedArgs];
safeLog("spawning shell with command:", `vercel ${cliArgs.join(" ")}`);
try {
const result = await spawn("vercel", cliArgs, { encoding: "utf8" });
return result.toString();
const result = spawnSync("vercel", cliArgs, { encoding: "utf8" });
return result.stdout.toString();
} catch (error) {
onError(sha, error);
throw error;
Expand Down
92 changes: 15 additions & 77 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2512,8 +2512,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "@ndla/scripts@workspace:packages/ndla-scripts"
dependencies:
cross-spawn: "npm:^7.0.3"
cross-spawn-promise: "npm:^0.10.2"
"@types/cross-spawn": "npm:^6.0.6"
cross-spawn: "npm:^7.0.6"
fast-glob: "npm:^3.3.2"
normalize-url: "npm:^8.0.1"
url-regex-safe: "npm:^4.0.0"
Expand Down Expand Up @@ -4304,6 +4304,15 @@ __metadata:
languageName: node
linkType: hard

"@types/cross-spawn@npm:^6.0.6":
version: 6.0.6
resolution: "@types/cross-spawn@npm:6.0.6"
dependencies:
"@types/node": "npm:*"
checksum: 10c0/e3d476bb6b3a54a8934a97fe6ee4bd13e2e5eb29073929a4be76a52466602ffaea420b20774ffe8503f9fa24f3ae34817e95e7f625689fb0d1c10404f5b2889c
languageName: node
linkType: hard

"@types/doctrine@npm:^0.0.9":
version: 0.0.9
resolution: "@types/doctrine@npm:0.0.9"
Expand Down Expand Up @@ -7322,34 +7331,14 @@ __metadata:
languageName: node
linkType: hard

"cross-spawn-promise@npm:^0.10.2":
version: 0.10.2
resolution: "cross-spawn-promise@npm:0.10.2"
dependencies:
cross-spawn: "npm:^5.1.0"
checksum: 10c0/adc3443eabbed5e32b90a0d92a07cd2b877be64f47c176589de1bdd385a8825c0e23e5e31dea28b89fa65689a1b71e9edf2b3dc46be786e3357ce01c081a22f7
languageName: node
linkType: hard

"cross-spawn@npm:^5.1.0":
version: 5.1.0
resolution: "cross-spawn@npm:5.1.0"
dependencies:
lru-cache: "npm:^4.0.1"
shebang-command: "npm:^1.2.0"
which: "npm:^1.2.9"
checksum: 10c0/1918621fddb9f8c61e02118b2dbf81f611ccd1544ceaca0d026525341832b8511ce2504c60f935dbc06b35e5ef156fe8c1e72708c27dd486f034e9c0e1e07201
languageName: node
linkType: hard

"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.5":
version: 7.0.5
resolution: "cross-spawn@npm:7.0.5"
"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.5, cross-spawn@npm:^7.0.6":
version: 7.0.6
resolution: "cross-spawn@npm:7.0.6"
dependencies:
path-key: "npm:^3.1.0"
shebang-command: "npm:^2.0.0"
which: "npm:^2.0.1"
checksum: 10c0/aa82ce7ac0814a27e6f2b738c5a7cf1fa21a3558a1e42df449fc96541ba3ba731e4d3ecffa4435348808a86212f287c6f20a1ee551ef1ff95d01cfec5f434944
checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1
languageName: node
linkType: hard

Expand Down Expand Up @@ -11399,16 +11388,6 @@ __metadata:
languageName: node
linkType: hard

"lru-cache@npm:^4.0.1":
version: 4.1.5
resolution: "lru-cache@npm:4.1.5"
dependencies:
pseudomap: "npm:^1.0.2"
yallist: "npm:^2.1.2"
checksum: 10c0/1ca5306814e5add9ec63556d6fd9b24a4ecdeaef8e9cea52cbf30301e6b88c8d8ddc7cab45b59b56eb763e6c45af911585dc89925a074ab65e1502e3fe8103cf
languageName: node
linkType: hard

"lru-cache@npm:^5.1.1":
version: 5.1.1
resolution: "lru-cache@npm:5.1.1"
Expand Down Expand Up @@ -13394,13 +13373,6 @@ __metadata:
languageName: node
linkType: hard

"pseudomap@npm:^1.0.2":
version: 1.0.2
resolution: "pseudomap@npm:1.0.2"
checksum: 10c0/5a91ce114c64ed3a6a553aa7d2943868811377388bb31447f9d8028271bae9b05b340fe0b6961a64e45b9c72946aeb0a4ab635e8f7cb3715ffd0ff2beeb6a679
languageName: node
linkType: hard

"pump@npm:^3.0.0":
version: 3.0.0
resolution: "pump@npm:3.0.0"
Expand Down Expand Up @@ -14306,15 +14278,6 @@ __metadata:
languageName: node
linkType: hard

"shebang-command@npm:^1.2.0":
version: 1.2.0
resolution: "shebang-command@npm:1.2.0"
dependencies:
shebang-regex: "npm:^1.0.0"
checksum: 10c0/7b20dbf04112c456b7fc258622dafd566553184ac9b6938dd30b943b065b21dabd3776460df534cc02480db5e1b6aec44700d985153a3da46e7db7f9bd21326d
languageName: node
linkType: hard

"shebang-command@npm:^2.0.0":
version: 2.0.0
resolution: "shebang-command@npm:2.0.0"
Expand All @@ -14324,13 +14287,6 @@ __metadata:
languageName: node
linkType: hard

"shebang-regex@npm:^1.0.0":
version: 1.0.0
resolution: "shebang-regex@npm:1.0.0"
checksum: 10c0/9abc45dee35f554ae9453098a13fdc2f1730e525a5eb33c51f096cc31f6f10a4b38074c1ebf354ae7bffa7229506083844008dfc3bb7818228568c0b2dc1fff2
languageName: node
linkType: hard

"shebang-regex@npm:^3.0.0":
version: 3.0.0
resolution: "shebang-regex@npm:3.0.0"
Expand Down Expand Up @@ -16114,17 +16070,6 @@ __metadata:
languageName: node
linkType: hard

"which@npm:^1.2.9":
version: 1.3.1
resolution: "which@npm:1.3.1"
dependencies:
isexe: "npm:^2.0.0"
bin:
which: ./bin/which
checksum: 10c0/e945a8b6bbf6821aaaef7f6e0c309d4b615ef35699576d5489b4261da9539f70393c6b2ce700ee4321c18f914ebe5644bc4631b15466ffbaad37d83151f6af59
languageName: node
linkType: hard

"which@npm:^2.0.1":
version: 2.0.2
resolution: "which@npm:2.0.2"
Expand Down Expand Up @@ -16320,13 +16265,6 @@ __metadata:
languageName: node
linkType: hard

"yallist@npm:^2.1.2":
version: 2.1.2
resolution: "yallist@npm:2.1.2"
checksum: 10c0/0b9e25aa00adf19e01d2bcd4b208aee2b0db643d9927131797b7af5ff69480fc80f1c3db738cbf3946f0bddf39d8f2d0a5709c644fd42d4aa3a4e6e786c087b5
languageName: node
linkType: hard

"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1":
version: 3.1.1
resolution: "yallist@npm:3.1.1"
Expand Down
Loading