wp-typia 0.22.9 → 0.23.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.
@@ -2,6 +2,9 @@
2
2
  import {
3
3
  PROJECT_TOOLS_PACKAGE_ROOT
4
4
  } from "./cli-qse6myha.js";
5
+ import {
6
+ getOptionalNodeErrorCode
7
+ } from "./cli-ts9thts5.js";
5
8
 
6
9
  // ../wp-typia-project-tools/src/runtime/package-versions.ts
7
10
  import fs from "fs";
@@ -19,9 +22,6 @@ var DEFAULT_WORDPRESS_DATA_VERSION = "^9.28.0";
19
22
  var DEFAULT_WORDPRESS_DATAVIEWS_VERSION = "^14.1.0";
20
23
  var DEFAULT_WP_TYPIA_DATAVIEWS_VERSION = "^0.1.1";
21
24
  var cachedPackageVersions = null;
22
- function getErrorCode(error) {
23
- return typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
24
- }
25
25
  function normalizeVersionRange(value) {
26
26
  const trimmed = value?.trim();
27
27
  if (!trimmed) {
@@ -73,7 +73,7 @@ function resolvePackageManifestLocation(packageJsonPath) {
73
73
  source
74
74
  };
75
75
  } catch (error) {
76
- if (getErrorCode(error) === "ENOENT") {
76
+ if (getOptionalNodeErrorCode(error) === "ENOENT") {
77
77
  return {
78
78
  cacheKey: `missing-file:${packageJsonPath}`,
79
79
  packageJsonPath: null,
@@ -103,7 +103,7 @@ function resolveInstalledPackageManifestLocation(packageName) {
103
103
  try {
104
104
  return resolvePackageManifestLocation(require2.resolve(`${packageName}/package.json`));
105
105
  } catch (error) {
106
- if (getErrorCode(error) === "MODULE_NOT_FOUND") {
106
+ if (getOptionalNodeErrorCode(error) === "MODULE_NOT_FOUND") {
107
107
  return {
108
108
  cacheKey: `missing-module:${packageName}`,
109
109
  packageJsonPath: null,
@@ -184,4 +184,4 @@ function getPackageVersions() {
184
184
 
185
185
  export { DEFAULT_WORDPRESS_ABILITIES_VERSION, DEFAULT_WORDPRESS_CORE_ABILITIES_VERSION, DEFAULT_WORDPRESS_CORE_DATA_VERSION, DEFAULT_WORDPRESS_DATA_VERSION, DEFAULT_WORDPRESS_DATAVIEWS_VERSION, DEFAULT_WP_TYPIA_DATAVIEWS_VERSION, resolveManagedPackageVersionRange, getPackageVersions };
186
186
 
187
- //# debugId=5EDDE195AC44420B64756E2164756E21
187
+ //# debugId=00D2485EFE2B66E864756E2164756E21
@@ -11,7 +11,7 @@ import {
11
11
  } from "./cli-qse6myha.js";
12
12
  import {
13
13
  pathExists
14
- } from "./cli-regw5384.js";
14
+ } from "./cli-ts9thts5.js";
15
15
  import {
16
16
  createManagedTempRoot
17
17
  } from "./cli-t73q5aqz.js";