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

@teambit/component-package-version

Package Overview
Dependencies
Maintainers
16
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/component-package-version - npm Package Compare versions

Comparing version 0.0.413 to 0.0.414

package-tar/teambit-component-package-version-0.0.414.tgz

2

component-package-version.ts

@@ -14,3 +14,3 @@ import { Component } from '@teambit/component';

*/
export async function getComponentPackageVersion(component: Component, snapId?: string): Promise<string> {
export function getComponentPackageVersion(component: Component, snapId?: string): string {
const actualSnapId = snapId || component.head?.hash;

@@ -17,0 +17,0 @@ if (!actualSnapId) {

@@ -12,3 +12,3 @@ import { Component } from '@teambit/component';

*/
export declare function getComponentPackageVersion(component: Component, snapId?: string): Promise<string>;
export declare function getComponentPackageVersion(component: Component, snapId?: string): string;
export declare function snapToSemver(version: string): string;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -26,14 +17,12 @@ exports.snapToSemver = exports.getComponentPackageVersion = void 0;

var _a;
return __awaiter(this, void 0, void 0, function* () {
const actualSnapId = snapId || ((_a = component.head) === null || _a === void 0 ? void 0 : _a.hash);
if (!actualSnapId) {
return '0.0.0';
}
// Checking if the snap is already a tag
const tagBySnap = component.tags.byHash(actualSnapId);
if (tagBySnap) {
return `${tagBySnap.version}`;
}
return snapToSemver(actualSnapId);
});
const actualSnapId = snapId || ((_a = component.head) === null || _a === void 0 ? void 0 : _a.hash);
if (!actualSnapId) {
return '0.0.0';
}
// Checking if the snap is already a tag
const tagBySnap = component.tags.byHash(actualSnapId);
if (tagBySnap) {
return `${tagBySnap.version}`;
}
return snapToSemver(actualSnapId);
}

@@ -40,0 +29,0 @@ exports.getComponentPackageVersion = getComponentPackageVersion;

{
"name": "@teambit/component-package-version",
"version": "0.0.413",
"version": "0.0.414",
"homepage": "https://bit.dev/teambit/component/component-package-version",

@@ -9,3 +9,3 @@ "main": "dist/index.js",

"name": "component-package-version",
"version": "0.0.413"
"version": "0.0.414"
},

@@ -12,0 +12,0 @@ "dependencies": {

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