extension-develop 3.9.5 → 3.10.0-canary.239.9cce684

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.
@@ -67,15 +67,16 @@ function findNearestPackageJsonSync(manifestPath) {
67
67
  return null;
68
68
  }
69
69
  }
70
- require("os");
71
70
  require("pintor");
72
- const external_module_namespaceObject = require("module");
73
- (0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
74
71
  require("crypto");
75
72
  require("child_process");
73
+ const external_module_namespaceObject = require("module");
74
+ (0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
75
+ require("os");
76
76
  (0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
77
- function parseJsonSafe(text) {
78
- const s = text && 0xfeff === text.charCodeAt(0) ? text.slice(1) : text;
77
+ function runtime_context_parseJsonSafe(text) {
78
+ const raw = 'string' == typeof text ? text : String(text || '');
79
+ const s = raw && 0xfeff === raw.charCodeAt(0) ? raw.slice(1) : raw;
79
80
  return JSON.parse(s || '{}');
80
81
  }
81
82
  function hasDependency(projectPath, dependency) {
@@ -94,9 +95,9 @@ function hasDependency(projectPath, dependency) {
94
95
  if (!packageJsonDirectory) return false;
95
96
  const packageJsonPath = external_path_namespaceObject.join(packageJsonDirectory, 'package.json');
96
97
  if (!external_fs_namespaceObject.existsSync(packageJsonPath)) return false;
97
- const packageJson = parseJsonSafe(external_fs_namespaceObject.readFileSync(packageJsonPath, 'utf8'));
98
- const dependencies = packageJson.dependencies || {};
99
- const devDependencies = packageJson.devDependencies || {};
98
+ const parsed = runtime_context_parseJsonSafe(external_fs_namespaceObject.readFileSync(packageJsonPath, 'utf8'));
99
+ const dependencies = parsed.dependencies || {};
100
+ const devDependencies = parsed.devDependencies || {};
100
101
  return !!dependencies[dependency] || !!devDependencies[dependency];
101
102
  }
102
103
  const core_namespaceObject = require("@swc/core");
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "webpack/webpack-lib/optional-dependencies.json"
26
26
  ],
27
27
  "name": "extension-develop",
28
- "version": "3.9.5",
28
+ "version": "3.10.0-canary.239.9cce684",
29
29
  "description": "Develop, build, preview, and package Extension.js projects.",
30
30
  "author": {
31
31
  "name": "Cezar Augusto",