Commit 76f8b4f0 authored by insert's avatar insert 🎺

Figured out scope issue

parent 93dc25a4
{
"name": "lvpm",
"version": "1.0.1",
"version": "1.1.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "lvpm",
"version": "1.1.3",
"version": "1.1.4",
"description": "Generic package manager.",
"main": "dist/index.js",
"scripts": {
......
......@@ -13,8 +13,6 @@ export interface Package {
export async function GetPackage(slug: string, folder: Folder): Promise<Package | undefined> {
let path = folder.resolve(slug);
if (!existsSync(path)) return;
let segments = slug.split('/');
let name = <string> segments.pop();
let scope = segments.shift();
......@@ -22,6 +20,9 @@ export async function GetPackage(slug: string, folder: Folder): Promise<Package
path = name;
if (scope) path = '@' + scope + '/' + path;
path = folder.resolve(path);
if (!existsSync(path)) return;
let pj = resolve(path, 'package.json');
if (!existsSync(pj)) return;
let json = JSON.parse(readFileSync(pj).toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment