Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jsbits/get-package-version

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsbits/get-package-version - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.eslintrc.js

23

CHANGELOG.md
# Changelog for @jsbits/get-package-version
See the [changelog of JSLib](https://github.com/ProJSLib/jsbits/blob/master/CHANGELOG.md)
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## \[1.0.2] - 2018-12-06
### Fixed
- Issues with codebeat linters.
## \[1.0.1] - 2018-11-12
### Added
- Badges in the Readme.
### Fixed
- Wrong `export default` in typings, the correct one is `export =`.
- Coverage report.
## \[1.0.0] - 2018-11-09
Initial release.

2

esm/index.js
/*
@jsbits/get-package-version
@version 1.0.1 ESM/ES5
@version 1.0.2 ESM/ES5
@license BSD-2-Clause (c) 2018 Alberto Martínez

@@ -6,0 +6,0 @@ @author @aMarCruz

{
"name": "@jsbits/get-package-version",
"version": "1.0.1",
"version": "1.0.2",
"description": "Get the version of the package.json file found in the given directory or in one of its parents.",

@@ -21,3 +21,26 @@ "license": "BSD-2-Clause",

"url": "https://github.com/ProJSLib/jsbits.git"
}
}
},
"scripts": {
"lint": "eslint --ext js .",
"pretest": "tsc",
"test": "mocha test/index.spec.ts"
},
"devDependencies": {
"@types/expect.js": "^0.3.29",
"@types/mocha": "^5.2.5",
"expect.js": "^0.3.1",
"mocha": "^5.2.0",
"ts-node": "^7.0.1",
"typescript": "~3.2.1"
},
"keywords": [
"javascript",
"typescript",
"es6",
"node",
"package",
"json",
"version",
"detect"
]
}
# @jsbits/get-package-version
[![License][license-badge]](LICENSE)
[![AppVeyor Test][appveyor-badge]][appveyor-url]
[![Travis Test][travis-badge]][travis-url]

@@ -25,3 +26,3 @@ [![Codebeat][codebeat-badge]][codebeat-url]

## `getPackageVersion([pkgPath])` ⇒ <code>string</code>
## `getPackageVersion([pkgPath])` ⇒ `string`

@@ -37,5 +38,5 @@ Returns the version of the first package.json file found in the given

| --- | --- | --- | --- |
| \[pkgPath] | <code>string</code> | <code>&quot;.&quot;</code> | Initial directory to search, defaults to `process.cwd()`. |
| \[pkgPath] | `string` | `&quot;.&quot;` | Initial directory to search, defaults to `process.cwd()`. |
**Returns**: <code>string</code> - The package version, or an empty string if it could not be found.
**Returns**: `string` - The package version, or an empty string if it could not be found.

@@ -66,3 +67,16 @@ Since 1.0.0<br>

## Support my Work
I'm a full-stack developer with more than 20 year of experience and I try to share most of my work for free and help others, but this takes a significant amount of time and effort so, if you like my work, please consider...
<!-- markdownlint-disable MD033 -->
[<img src="https://amarcruz.github.io/images/kofi_blue.png" height="36" title="Support Me on Ko-fi" />][kofi-url]
<!-- markdownlint-enable MD033 -->
Of course, feedback, PRs, and stars are also welcome 🙃
Thanks for your support!
---
[![Codacy][codacy-badge]][codacy-url]

@@ -78,2 +92,4 @@ [![Codacy coverage][codacyc-badge]][codacyc-url]

[npm-url]: https://www.npmjs.com/package/@jsbits/get-package-version
[appveyor-badge]: https://ci.appveyor.com/api/projects/status/yh5018ej9u6fnau8?svg=true
[appveyor-url]: https://ci.appveyor.com/project/aMarCruz/jsbits
[travis-badge]: https://travis-ci.org/ProJSLib/jsbits.svg?branch=master

@@ -95,1 +111,2 @@ [travis-url]: https://travis-ci.org/ProJSLib/jsbits

[jsbits-formats]: https://github.com/ProJSLib/jsbits#distribution-formats
[kofi-url]: https://ko-fi.com/C0C7LF7I

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