Socket
Socket
Sign inDemoInstall

@expo/config

Package Overview
Dependencies
Maintainers
27
Versions
229
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/config - npm Package Compare versions

Comparing version 9.1.0-canary-20240719-83ee47b to 9.1.0-canary-20240814-ce0f7d5

build/paths/env.d.ts

11

build/paths/paths.d.ts

@@ -10,1 +10,12 @@ import { PackageJSONConfig } from '../Config.types';

export declare function getFileWithExtensions(fromDirectory: string, moduleId: string, extensions: string[]): string | null;
/**
* Convert an absolute entry point to a server or project root relative filepath.
* This is useful on Android where the entry point is an absolute path.
*/
export declare function convertEntryPointToRelative(projectRoot: string, absolutePath: string): string;
/**
* Resolve the entry point relative to either the server or project root.
* This relative entry path should be used to pass non-absolute paths to Metro,
* accounting for possible monorepos and keeping the cache sharable (no absolute paths).
*/
export declare const resolveRelativeEntryPoint: typeof resolveEntryPoint;

46

build/paths/paths.js

@@ -6,2 +6,3 @@ "use strict";

});
exports.convertEntryPointToRelative = convertEntryPointToRelative;
exports.ensureSlash = ensureSlash;

@@ -11,2 +12,3 @@ exports.getFileWithExtensions = getFileWithExtensions;

exports.resolveEntryPoint = resolveEntryPoint;
exports.resolveRelativeEntryPoint = void 0;
function _fs() {

@@ -33,2 +35,9 @@ const data = _interopRequireDefault(require("fs"));

}
function _env() {
const data = require("./env");
_env = function () {
return data;
};
return data;
}
function _extensions() {

@@ -41,2 +50,9 @@ const data = require("./extensions");

}
function _workspaces() {
const data = require("./workspaces");
_workspaces = function () {
return data;
};
return data;
}
function _Config() {

@@ -61,3 +77,3 @@ const data = require("../Config");

if (hasSlash && !needsSlash) {
return inputPath.substr(0, inputPath.length - 1);
return inputPath.substring(0, inputPath.length - 1);
} else if (!hasSlash && needsSlash) {

@@ -140,2 +156,30 @@ return `${inputPath}/`;

}
/** Get the Metro server root, when working in monorepos */
function getMetroServerRoot(projectRoot) {
if (_env().env.EXPO_NO_METRO_WORKSPACE_ROOT) {
return projectRoot;
}
return (0, _workspaces().findWorkspaceRoot)(projectRoot) ?? projectRoot;
}
/**
* Convert an absolute entry point to a server or project root relative filepath.
* This is useful on Android where the entry point is an absolute path.
*/
function convertEntryPointToRelative(projectRoot, absolutePath) {
// The project root could be using a different root on MacOS (`/var` vs `/private/var`)
// We need to make sure to get the non-symlinked path to the server or project root.
return _path().default.relative(_fs().default.realpathSync(getMetroServerRoot(projectRoot)), _fs().default.realpathSync(absolutePath));
}
/**
* Resolve the entry point relative to either the server or project root.
* This relative entry path should be used to pass non-absolute paths to Metro,
* accounting for possible monorepos and keeping the cache sharable (no absolute paths).
*/
const resolveRelativeEntryPoint = (projectRoot, options) => {
return convertEntryPointToRelative(projectRoot, resolveEntryPoint(projectRoot, options));
};
exports.resolveRelativeEntryPoint = resolveRelativeEntryPoint;
//# sourceMappingURL=paths.js.map

13

package.json
{
"name": "@expo/config",
"version": "9.1.0-canary-20240719-83ee47b",
"version": "9.1.0-canary-20240814-ce0f7d5",
"description": "A library for interacting with the app.json",

@@ -37,5 +37,6 @@ "main": "build/index.js",

"@babel/code-frame": "~7.10.4",
"@expo/config-plugins": "8.0.9-canary-20240719-83ee47b",
"@expo/config-types": "52.0.0-canary-20240719-83ee47b",
"@expo/json-file": "8.3.4-canary-20240719-83ee47b",
"@expo/config-plugins": "8.0.9-canary-20240814-ce0f7d5",
"@expo/config-types": "52.0.0-canary-20240814-ce0f7d5",
"@expo/json-file": "8.3.4-canary-20240814-ce0f7d5",
"find-yarn-workspace-root": "^2.0.0",
"getenv": "^1.0.0",

@@ -51,3 +52,3 @@ "glob": "^10.4.2",

"@types/require-from-string": "^1.2.1",
"expo-module-scripts": "3.6.0-canary-20240719-83ee47b"
"expo-module-scripts": "3.6.0-canary-20240814-ce0f7d5"
},

@@ -57,3 +58,3 @@ "publishConfig": {

},
"gitHead": "83ee47b5c89c7f1b1a5101189580eaf3555f5962"
"gitHead": "ce0f7d5c7eaec2c8d06ee4e0dc0e58cd6c1612ed"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc