bep53-range
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -0,1 +1,34 @@ | ||
# [2.0.0](https://github.com/webtorrent/bep53-range/compare/v1.1.1...v2.0.0) (2022-11-16) | ||
### chore | ||
* switch to ESM ([#17](https://github.com/webtorrent/bep53-range/issues/17)) ([68d1c3c](https://github.com/webtorrent/bep53-range/commit/68d1c3c2576031a7e5ec495532e423f739ffde79)) | ||
### BREAKING CHANGES | ||
* ESM only | ||
* refactor: esm module update | ||
- use export and import with destructuring | ||
- define default exports | ||
- update tests | ||
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com> | ||
* chore: update package.json and readme | ||
- use destruct in readme | ||
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com> | ||
* chore: update deps security issue | ||
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com> | ||
* Update package.json | ||
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com> | ||
Co-authored-by: Diego Rodríguez Baquero <github@diegorbaquero.com> | ||
* ESM only | ||
## [1.1.1](https://github.com/webtorrent/bep53-range/compare/v1.1.0...v1.1.1) (2021-07-23) | ||
@@ -2,0 +35,0 @@ |
11
index.js
@@ -1,5 +0,1 @@ | ||
module.exports = parseRange | ||
module.exports.parse = parseRange | ||
module.exports.compose = composeRange | ||
function composeRange (range) { | ||
@@ -26,1 +22,8 @@ return range | ||
} | ||
export default parseRange | ||
export { | ||
parseRange as parse, | ||
composeRange as compose | ||
} |
{ | ||
"name": "bep53-range", | ||
"description": "Magnet URI extension (BEP53) range implementation", | ||
"version": "1.1.1", | ||
"type": "module", | ||
"version": "2.0.0", | ||
"author": { | ||
@@ -13,9 +14,19 @@ "name": "Julen Garcia Leunda", | ||
"devDependencies": { | ||
"@webtorrent/semantic-release-config": "1.0.5", | ||
"semantic-release": "17.4.4", | ||
"@webtorrent/semantic-release-config": "1.0.8", | ||
"semantic-release": "19.0.5", | ||
"standard": "*", | ||
"tape": "^5.0.1" | ||
"tape": "5.6.1" | ||
}, | ||
"engines": { | ||
"node": ">=12.20.0" | ||
}, | ||
"exports": { | ||
"import": "./index.js" | ||
}, | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/webtorrent/bep53-range.git" | ||
}, | ||
"scripts": { | ||
@@ -22,0 +33,0 @@ "test": "standard && tape test/*.js" |
@@ -29,7 +29,7 @@ # bep53-range [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] | ||
```js | ||
const bep53Range = require('bep53-range') | ||
import { parse } from 'bep53-range' | ||
const range = ['1-3', '6', '11-13'] | ||
const values = bep53Range.parse(range) | ||
const values = parse(range) | ||
console.log(values) // [1, 2, 3, 6, 11, 12, 13] | ||
@@ -44,7 +44,7 @@ | ||
```js | ||
const bep53Range = require('bep53-range') | ||
import { compose } from 'bep53-range' | ||
const values = [1, 2, 3, 6, 11, 12, 13] | ||
const range = bep53Range.compose(values) | ||
const range = compose(values) | ||
console.log(range) // ['1-3', '6', '11-13'] | ||
@@ -51,0 +51,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
5766
28
0
0
Yes