@quilted/create 0.1.21 → 0.1.24

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.
@@ -1,7 +1,7 @@
1
- import path from 'node:path';
1
+ import path__default from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import process from 'node:process';
4
- import fs, { promises } from 'node:fs';
4
+ import fs__default, { promises } from 'node:fs';
5
5
 
6
6
  /*
7
7
  How it works:
@@ -219,7 +219,7 @@ async function locatePath(
219
219
 
220
220
  return pLocate(paths, async path_ => {
221
221
  try {
222
- const stat = await statFunction(path.resolve(cwd, path_));
222
+ const stat = await statFunction(path__default.resolve(cwd, path_));
223
223
  return matchType(type, stat);
224
224
  } catch {
225
225
  return false;
@@ -238,11 +238,11 @@ function locatePathSync(
238
238
  checkType(type);
239
239
  cwd = toPath$1(cwd);
240
240
 
241
- const statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;
241
+ const statFunction = allowSymlinks ? fs__default.statSync : fs__default.lstatSync;
242
242
 
243
243
  for (const path_ of paths) {
244
244
  try {
245
- const stat = statFunction(path.resolve(cwd, path_));
245
+ const stat = statFunction(path__default.resolve(cwd, path_));
246
246
 
247
247
  if (matchType(type, stat)) {
248
248
  return path_;
@@ -256,9 +256,9 @@ const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath)
256
256
  const findUpStop = Symbol('findUpStop');
257
257
 
258
258
  async function findUpMultiple(name, options) {
259
- let directory = path.resolve(toPath(options.cwd) || '');
260
- const {root} = path.parse(directory);
261
- const stopAt = path.resolve(directory, options.stopAt || root);
259
+ let directory = path__default.resolve(toPath(options.cwd) || '');
260
+ const {root} = path__default.parse(directory);
261
+ const stopAt = path__default.resolve(directory, options.stopAt || root);
262
262
  const limit = options.limit || Number.POSITIVE_INFINITY;
263
263
  const paths = [name].flat();
264
264
 
@@ -286,22 +286,22 @@ async function findUpMultiple(name, options) {
286
286
  }
287
287
 
288
288
  if (foundPath) {
289
- matches.push(path.resolve(directory, foundPath));
289
+ matches.push(path__default.resolve(directory, foundPath));
290
290
  }
291
291
 
292
292
  if (directory === stopAt || matches.length >= limit) {
293
293
  break;
294
294
  }
295
295
 
296
- directory = path.dirname(directory);
296
+ directory = path__default.dirname(directory);
297
297
  }
298
298
 
299
299
  return matches;
300
300
  }
301
301
 
302
302
  function findUpMultipleSync(name, options) {
303
- let directory = path.resolve(toPath(options.cwd) || '');
304
- const {root} = path.parse(directory);
303
+ let directory = path__default.resolve(toPath(options.cwd) || '');
304
+ const {root} = path__default.parse(directory);
305
305
  const stopAt = options.stopAt || root;
306
306
  const limit = options.limit || Number.POSITIVE_INFINITY;
307
307
  const paths = [name].flat();
@@ -329,14 +329,14 @@ function findUpMultipleSync(name, options) {
329
329
  }
330
330
 
331
331
  if (foundPath) {
332
- matches.push(path.resolve(directory, foundPath));
332
+ matches.push(path__default.resolve(directory, foundPath));
333
333
  }
334
334
 
335
335
  if (directory === stopAt || matches.length >= limit) {
336
336
  break;
337
337
  }
338
338
 
339
- directory = path.dirname(directory);
339
+ directory = path__default.dirname(directory);
340
340
  }
341
341
 
342
342
  return matches;
@@ -354,12 +354,12 @@ function findUpSync(name, options) {
354
354
 
355
355
  async function packageDirectory({cwd} = {}) {
356
356
  const filePath = await findUp('package.json', {cwd});
357
- return filePath && path.dirname(filePath);
357
+ return filePath && path__default.dirname(filePath);
358
358
  }
359
359
 
360
360
  function packageDirectorySync({cwd} = {}) {
361
361
  const filePath = findUpSync('package.json', {cwd});
362
- return filePath && path.dirname(filePath);
362
+ return filePath && path__default.dirname(filePath);
363
363
  }
364
364
 
365
365
  export { packageDirectory, packageDirectorySync };