@poppinss/utils 6.9.3 → 6.9.4
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.
- package/build/index.js +10 -10
- package/build/src/assert.js +2 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
} from "./chunk-2KG3PWR4.js";
|
|
18
18
|
|
|
19
19
|
// index.ts
|
|
20
|
-
import { fileURLToPath as fileURLToPath3 } from "
|
|
21
|
-
import { join as pathJoin, dirname as pathDirname } from "
|
|
20
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
21
|
+
import { join as pathJoin, dirname as pathDirname } from "path";
|
|
22
22
|
|
|
23
23
|
// src/secret.ts
|
|
24
24
|
var REDACTED = "[redacted]";
|
|
@@ -152,14 +152,14 @@ function flatten(input, glue, keepNullish) {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
// src/fs_import_all.ts
|
|
155
|
-
import { fileURLToPath as fileURLToPath2 } from "
|
|
155
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
156
156
|
import lodash2 from "@poppinss/utils/lodash";
|
|
157
|
-
import { extname as extname2, relative, sep } from "
|
|
157
|
+
import { extname as extname2, relative, sep } from "path";
|
|
158
158
|
|
|
159
159
|
// src/fs_read_all.ts
|
|
160
|
-
import { join } from "
|
|
161
|
-
import { readdir, stat } from "
|
|
162
|
-
import { fileURLToPath, pathToFileURL } from "
|
|
160
|
+
import { join } from "path";
|
|
161
|
+
import { readdir, stat } from "fs/promises";
|
|
162
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
163
163
|
|
|
164
164
|
// src/natural_sort.ts
|
|
165
165
|
function naturalSort(current, next) {
|
|
@@ -220,7 +220,7 @@ async function fsReadAll(location, options) {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
// src/is_script_file.ts
|
|
223
|
-
import { extname } from "
|
|
223
|
+
import { extname } from "path";
|
|
224
224
|
var JS_MODULES = [".js", ".json", ".cjs", ".mjs"];
|
|
225
225
|
function isScriptFile(filePath) {
|
|
226
226
|
const ext = extname(filePath);
|
|
@@ -312,8 +312,8 @@ __reExport(object_builder_exports, object_builder_star);
|
|
|
312
312
|
import * as object_builder_star from "@poppinss/object-builder";
|
|
313
313
|
|
|
314
314
|
// src/safe_equal.ts
|
|
315
|
-
import { Buffer as Buffer2 } from "
|
|
316
|
-
import { timingSafeEqual } from "
|
|
315
|
+
import { Buffer as Buffer2 } from "buffer";
|
|
316
|
+
import { timingSafeEqual } from "crypto";
|
|
317
317
|
function safeEqual(trustedValue, userInput) {
|
|
318
318
|
if (typeof trustedValue === "string" && typeof userInput === "string") {
|
|
319
319
|
const trustedLength = Buffer2.byteLength(trustedValue);
|
package/build/src/assert.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../chunk-2KG3PWR4.js";
|
|
2
2
|
|
|
3
3
|
// src/assert.ts
|
|
4
|
-
import { inspect } from "
|
|
5
|
-
import { AssertionError } from "
|
|
4
|
+
import { inspect } from "util";
|
|
5
|
+
import { AssertionError } from "assert";
|
|
6
6
|
function assert(value, message) {
|
|
7
7
|
return assertExists(value, message);
|
|
8
8
|
}
|