@augment-vir/node 31.67.1 → 31.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,10 +14,10 @@ export async function downloadFile({ url, writePath }) {
|
|
|
14
14
|
const response = await fetch(url);
|
|
15
15
|
if (!response.ok) {
|
|
16
16
|
throw new Error(`${response.status}: ${response.statusText}`);
|
|
17
|
+
/** Idk how to actually trigger a response with no body. */
|
|
18
|
+
/* node:coverage ignore next 3 */
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
/* node:coverage ignore next 3 */
|
|
20
|
-
if (!response.body) {
|
|
20
|
+
else if (!response.body) {
|
|
21
21
|
throw new Error(`Response body is missing from '${url}'.`);
|
|
22
22
|
}
|
|
23
23
|
await mkdir(dirname(writePath), {
|
|
@@ -16,7 +16,7 @@ export async function readPackageJson(dirPath) {
|
|
|
16
16
|
if (!packageJson) {
|
|
17
17
|
throw new TypeError(`package.json file does not exist in '${dirPath}'`);
|
|
18
18
|
}
|
|
19
|
-
if (!check.isObject(packageJson)) {
|
|
19
|
+
else if (!check.isObject(packageJson)) {
|
|
20
20
|
throw new TypeError(`Parsing package.json file did not return an object in '${dirPath}'`);
|
|
21
21
|
}
|
|
22
22
|
return packageJson;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/node",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.68.0",
|
|
4
4
|
"description": "A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"augment",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"test:update": "npm test"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@augment-vir/assert": "^31.
|
|
42
|
-
"@augment-vir/common": "^31.
|
|
41
|
+
"@augment-vir/assert": "^31.68.0",
|
|
42
|
+
"@augment-vir/common": "^31.68.0",
|
|
43
43
|
"@date-vir/duration": "^8.2.0",
|
|
44
44
|
"ansi-styles": "^6.2.3",
|
|
45
45
|
"sanitize-filename": "^1.6.3",
|
|
46
46
|
"terminate": "^2.8.0",
|
|
47
47
|
"tsx": "^4.21.0",
|
|
48
48
|
"type-fest": "^5.4.4",
|
|
49
|
-
"typed-event-target": "^4.
|
|
49
|
+
"typed-event-target": "^4.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@augment-vir/test": "^31.
|
|
53
|
-
"@types/node": "^25.3.
|
|
52
|
+
"@augment-vir/test": "^31.68.0",
|
|
53
|
+
"@types/node": "^25.3.5",
|
|
54
54
|
"@web/dev-server-esbuild": "^1.0.5",
|
|
55
55
|
"@web/test-runner": "^0.20.2",
|
|
56
56
|
"@web/test-runner-playwright": "^0.11.1",
|
|
@@ -17,11 +17,9 @@ export async function downloadFile({url, writePath}: {url: string; writePath: st
|
|
|
17
17
|
|
|
18
18
|
if (!response.ok) {
|
|
19
19
|
throw new Error(`${response.status}: ${response.statusText}`);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/* node:coverage ignore next 3 */
|
|
24
|
-
if (!response.body) {
|
|
20
|
+
/** Idk how to actually trigger a response with no body. */
|
|
21
|
+
/* node:coverage ignore next 3 */
|
|
22
|
+
} else if (!response.body) {
|
|
25
23
|
throw new Error(`Response body is missing from '${url}'.`);
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -18,9 +18,7 @@ export async function readPackageJson(dirPath: string): Promise<PackageJson> {
|
|
|
18
18
|
|
|
19
19
|
if (!packageJson) {
|
|
20
20
|
throw new TypeError(`package.json file does not exist in '${dirPath}'`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (!check.isObject(packageJson)) {
|
|
21
|
+
} else if (!check.isObject(packageJson)) {
|
|
24
22
|
throw new TypeError(`Parsing package.json file did not return an object in '${dirPath}'`);
|
|
25
23
|
}
|
|
26
24
|
|