New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@expo/package-manager

Package Overview
Dependencies
Maintainers
27
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/package-manager - npm Package Compare versions

Comparing version 1.5.3-canary-20240814-ce0f7d5 to 1.5.3-canary-20240904-69100c1

1

build/index.d.ts

@@ -8,3 +8,2 @@ export * from './PackageManager';

export * from './utils/nodeManagers';
export * from './utils/nodeWorkspaces';
export { isYarnOfflineAsync } from './utils/yarn';

@@ -25,5 +25,4 @@ "use strict";

__exportStar(require("./utils/nodeManagers"), exports);
__exportStar(require("./utils/nodeWorkspaces"), exports);
var yarn_1 = require("./utils/yarn");
Object.defineProperty(exports, "isYarnOfflineAsync", { enumerable: true, get: function () { return yarn_1.isYarnOfflineAsync; } });
//# sourceMappingURL=index.js.map

6

build/node/BunPackageManager.js

@@ -5,9 +5,9 @@ "use strict";

const BasePackageManager_1 = require("./BasePackageManager");
const nodeWorkspaces_1 = require("../utils/nodeWorkspaces");
const nodeManagers_1 = require("../utils/nodeManagers");
class BunPackageManager extends BasePackageManager_1.BasePackageManager {
name = 'bun';
bin = 'bun';
lockFile = nodeWorkspaces_1.BUN_LOCK_FILE;
lockFile = nodeManagers_1.BUN_LOCK_FILE;
workspaceRoot() {
const root = (0, nodeWorkspaces_1.findYarnOrNpmWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
const root = (0, nodeManagers_1.resolveWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
if (root) {

@@ -14,0 +14,0 @@ return new BunPackageManager({

@@ -12,3 +12,3 @@ "use strict";

const BasePackageManager_1 = require("./BasePackageManager");
const nodeWorkspaces_1 = require("../utils/nodeWorkspaces");
const nodeManagers_1 = require("../utils/nodeManagers");
const spawn_1 = require("../utils/spawn");

@@ -18,5 +18,5 @@ class NpmPackageManager extends BasePackageManager_1.BasePackageManager {

bin = 'npm';
lockFile = nodeWorkspaces_1.NPM_LOCK_FILE;
lockFile = nodeManagers_1.NPM_LOCK_FILE;
workspaceRoot() {
const root = (0, nodeWorkspaces_1.findYarnOrNpmWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
const root = (0, nodeManagers_1.resolveWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
if (root) {

@@ -23,0 +23,0 @@ return new NpmPackageManager({

@@ -9,9 +9,9 @@ "use strict";

const env_1 = __importDefault(require("../utils/env"));
const nodeWorkspaces_1 = require("../utils/nodeWorkspaces");
const nodeManagers_1 = require("../utils/nodeManagers");
class PnpmPackageManager extends BasePackageManager_1.BasePackageManager {
name = 'pnpm';
bin = 'pnpm';
lockFile = nodeWorkspaces_1.PNPM_LOCK_FILE;
lockFile = nodeManagers_1.PNPM_LOCK_FILE;
workspaceRoot() {
const root = (0, nodeWorkspaces_1.findPnpmWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
const root = (0, nodeManagers_1.resolveWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
if (root) {

@@ -18,0 +18,0 @@ return new PnpmPackageManager({

@@ -5,3 +5,3 @@ "use strict";

const BasePackageManager_1 = require("./BasePackageManager");
const nodeWorkspaces_1 = require("../utils/nodeWorkspaces");
const nodeManagers_1 = require("../utils/nodeManagers");
const spawn_1 = require("../utils/spawn");

@@ -12,3 +12,3 @@ const yarn_1 = require("../utils/yarn");

bin = 'yarnpkg';
lockFile = nodeWorkspaces_1.YARN_LOCK_FILE;
lockFile = nodeManagers_1.YARN_LOCK_FILE;
/** Check if Yarn is running in offline mode, and add the `--offline` flag */

@@ -19,3 +19,3 @@ async withOfflineFlagAsync(namesOrFlags) {

workspaceRoot() {
const root = (0, nodeWorkspaces_1.findYarnOrNpmWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
const root = (0, nodeManagers_1.resolveWorkspaceRoot)(this.ensureCwdDefined('workspaceRoot'));
if (root) {

@@ -22,0 +22,0 @@ return new YarnPackageManager({

@@ -6,12 +6,12 @@ import { PackageManagerOptions } from '../PackageManager';

import { YarnPackageManager } from '../node/YarnPackageManager';
export { resolveWorkspaceRoot } from 'resolve-workspace-root';
export type NodePackageManager = NpmPackageManager | PnpmPackageManager | YarnPackageManager | BunPackageManager;
export type NodePackageManagerForProject = PackageManagerOptions & Partial<Record<NodePackageManager['name'], boolean>>;
export declare const NPM_LOCK_FILE = "package-lock.json";
export declare const YARN_LOCK_FILE = "yarn.lock";
export declare const PNPM_LOCK_FILE = "pnpm-lock.yaml";
export declare const BUN_LOCK_FILE = "bun.lockb";
/** The order of the package managers to use when resolving automatically */
export declare const RESOLUTION_ORDER: NodePackageManager['name'][];
/**
* Resolve the workspace root for a project, if its part of a monorepo.
* Optionally, provide a specific packager to only resolve that one specifically.
*/
export declare function findWorkspaceRoot(projectRoot: string, preferredManager?: NodePackageManager['name']): string | null;
/**
* Resolve the used node package manager for a project by checking the lockfile.

@@ -18,0 +18,0 @@ * This also tries to resolve the workspace root, if its part of a monorepo.

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.createForProject = exports.resolvePackageManager = exports.findWorkspaceRoot = exports.RESOLUTION_ORDER = void 0;
exports.createForProject = exports.resolvePackageManager = exports.RESOLUTION_ORDER = exports.BUN_LOCK_FILE = exports.PNPM_LOCK_FILE = exports.YARN_LOCK_FILE = exports.NPM_LOCK_FILE = exports.resolveWorkspaceRoot = void 0;
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const nodeWorkspaces_1 = require("./nodeWorkspaces");
const resolve_workspace_root_1 = require("resolve-workspace-root");
const BunPackageManager_1 = require("../node/BunPackageManager");

@@ -15,28 +15,11 @@ const NpmPackageManager_1 = require("../node/NpmPackageManager");

const YarnPackageManager_1 = require("../node/YarnPackageManager");
var resolve_workspace_root_2 = require("resolve-workspace-root");
Object.defineProperty(exports, "resolveWorkspaceRoot", { enumerable: true, get: function () { return resolve_workspace_root_2.resolveWorkspaceRoot; } });
exports.NPM_LOCK_FILE = 'package-lock.json';
exports.YARN_LOCK_FILE = 'yarn.lock';
exports.PNPM_LOCK_FILE = 'pnpm-lock.yaml';
exports.BUN_LOCK_FILE = 'bun.lockb';
/** The order of the package managers to use when resolving automatically */
exports.RESOLUTION_ORDER = ['bun', 'yarn', 'npm', 'pnpm'];
/**
* Resolve the workspace root for a project, if its part of a monorepo.
* Optionally, provide a specific packager to only resolve that one specifically.
*/
function findWorkspaceRoot(projectRoot, preferredManager) {
const strategies = {
npm: nodeWorkspaces_1.findYarnOrNpmWorkspaceRoot,
yarn: nodeWorkspaces_1.findYarnOrNpmWorkspaceRoot,
pnpm: nodeWorkspaces_1.findPnpmWorkspaceRoot,
bun: nodeWorkspaces_1.findYarnOrNpmWorkspaceRoot,
};
if (preferredManager) {
return strategies[preferredManager](projectRoot);
}
for (const strategy of exports.RESOLUTION_ORDER) {
const root = strategies[strategy](projectRoot);
if (root) {
return root;
}
}
return null;
}
exports.findWorkspaceRoot = findWorkspaceRoot;
/**
* Resolve the used node package manager for a project by checking the lockfile.

@@ -47,8 +30,8 @@ * This also tries to resolve the workspace root, if its part of a monorepo.

function resolvePackageManager(projectRoot, preferredManager) {
const root = findWorkspaceRoot(projectRoot, preferredManager) ?? projectRoot;
const root = (0, resolve_workspace_root_1.resolveWorkspaceRoot)(projectRoot) ?? projectRoot;
const lockFiles = {
npm: nodeWorkspaces_1.NPM_LOCK_FILE,
pnpm: nodeWorkspaces_1.PNPM_LOCK_FILE,
yarn: nodeWorkspaces_1.YARN_LOCK_FILE,
bun: nodeWorkspaces_1.BUN_LOCK_FILE,
npm: exports.NPM_LOCK_FILE,
pnpm: exports.PNPM_LOCK_FILE,
yarn: exports.YARN_LOCK_FILE,
bun: exports.BUN_LOCK_FILE,
};

@@ -55,0 +38,0 @@ if (preferredManager) {

{
"name": "@expo/package-manager",
"version": "1.5.3-canary-20240814-ce0f7d5",
"version": "1.5.3-canary-20240904-69100c1",
"description": "A library for installing and finding packages in a project",

@@ -40,3 +40,3 @@ "main": "build/index.js",

"dependencies": {
"@expo/json-file": "8.3.4-canary-20240814-ce0f7d5",
"@expo/json-file": "8.3.4-canary-20240904-69100c1",
"@expo/spawn-async": "^1.7.2",

@@ -46,3 +46,2 @@ "ansi-regex": "^5.0.0",

"find-up": "^5.0.0",
"find-yarn-workspace-root": "~2.0.0",
"js-yaml": "^3.13.1",

@@ -52,2 +51,3 @@ "micromatch": "^4.0.2",

"ora": "^3.4.0",
"resolve-workspace-root": "^1.0.0",
"split": "^1.0.1",

@@ -61,3 +61,3 @@ "sudo-prompt": "9.1.1"

"@types/split": "^1.0.0",
"expo-module-scripts": "3.6.0-canary-20240814-ce0f7d5"
"expo-module-scripts": "3.6.0-canary-20240904-69100c1"
},

@@ -67,3 +67,3 @@ "publishConfig": {

},
"gitHead": "ce0f7d5c7eaec2c8d06ee4e0dc0e58cd6c1612ed"
"gitHead": "69100c1b099b707057c052ed8096e06cb208aca1"
}

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