ranges-sort 5.0.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/ranges-sort.esm.js +2 -2
- package/dist/ranges-sort.umd.js +2 -2
- package/package.json +32 -32
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 5.0.3 (2021-11-02)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe))
|
|
15
|
+
|
|
16
|
+
### BREAKING CHANGES
|
|
17
|
+
|
|
18
|
+
- programs now are in ES Modules and won't work with Common JS require()
|
|
19
|
+
|
|
6
20
|
## 5.0.1 (2021-09-13)
|
|
7
21
|
|
|
8
22
|
### Bug Fixes
|
package/dist/ranges-sort.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-sort
|
|
3
3
|
* @fileoverview Sort string index ranges
|
|
4
|
-
* @version 5.0.
|
|
4
|
+
* @version 5.0.3
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-sort/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var version$1 = "5.0.
|
|
10
|
+
var version$1 = "5.0.3";
|
|
11
11
|
|
|
12
12
|
const version = version$1;
|
|
13
13
|
const defaults = {
|
package/dist/ranges-sort.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-sort
|
|
3
3
|
* @fileoverview Sort string index ranges
|
|
4
|
-
* @version 5.0.
|
|
4
|
+
* @version 5.0.3
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-sort/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).rangesSort={})}(this,(function(e){"use strict";const r={strictlyTwoElementsInRangeArrays:!1,progressFn:null};e.defaults=r,e.rSort=function(e,n){if(!Array.isArray(e)||!e.length)return e;const t={...r,...n};let s,o;if(t.strictlyTwoElementsInRangeArrays&&!e.filter((e=>e)).every(((e,r)=>2===e.length||(s=r,o=e.length,!1))))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${s}th range (${JSON.stringify(e[s],null,4)}) has not two but ${o} elements!`);if(!e.filter((e=>e)).every(((e,r)=>!(!Number.isInteger(e[0])||e[0]<0||!Number.isInteger(e[1])||e[1]<0)||(s=r,!1))))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${s}th range (${JSON.stringify(e[s],null,4)}) does not consist of only natural numbers!`);const i=e.filter((e=>e)).length**2;let a=0;return Array.from(e).filter((e=>e)).sort(((e,r)=>(t.progressFn&&(a+=1,t.progressFn(Math.floor(100*a/i))),e[0]===r[0]?e[1]<r[1]?-1:e[1]>r[1]?1:0:e[0]<r[0]?-1:1)))},e.version="5.0.
|
|
10
|
+
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).rangesSort={})}(this,(function(e){"use strict";const r={strictlyTwoElementsInRangeArrays:!1,progressFn:null};e.defaults=r,e.rSort=function(e,n){if(!Array.isArray(e)||!e.length)return e;const t={...r,...n};let s,o;if(t.strictlyTwoElementsInRangeArrays&&!e.filter((e=>e)).every(((e,r)=>2===e.length||(s=r,o=e.length,!1))))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${s}th range (${JSON.stringify(e[s],null,4)}) has not two but ${o} elements!`);if(!e.filter((e=>e)).every(((e,r)=>!(!Number.isInteger(e[0])||e[0]<0||!Number.isInteger(e[1])||e[1]<0)||(s=r,!1))))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${s}th range (${JSON.stringify(e[s],null,4)}) does not consist of only natural numbers!`);const i=e.filter((e=>e)).length**2;let a=0;return Array.from(e).filter((e=>e)).sort(((e,r)=>(t.progressFn&&(a+=1,t.progressFn(Math.floor(100*a/i))),e[0]===r[0]?e[1]<r[1]?-1:e[1]>r[1]?1:0:e[0]<r[0]?-1:1)))},e.version="5.0.3",Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-sort",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Sort string index ranges",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -29,11 +29,13 @@
|
|
|
29
29
|
"types": "types/index.d.ts",
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "rollup -c",
|
|
32
|
-
"esbuild": "node '../../scripts/esbuild.js'",
|
|
33
|
-
"esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
|
|
34
32
|
"ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
|
|
33
|
+
"clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
|
|
34
|
+
"clean_types": "../../scripts/cleanTypes.js",
|
|
35
35
|
"dev": "rollup -c --dev",
|
|
36
36
|
"devunittest": "npm run dev && tap --only -R 'base'",
|
|
37
|
+
"esbuild": "node '../../scripts/esbuild.js'",
|
|
38
|
+
"esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
|
|
37
39
|
"format": "npm run lect && npm run prettier && npm run lint",
|
|
38
40
|
"lect": "lect",
|
|
39
41
|
"lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
|
|
@@ -41,13 +43,11 @@
|
|
|
41
43
|
"prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
|
|
42
44
|
"republish": "npm publish || :",
|
|
43
45
|
"tap": "tap",
|
|
44
|
-
"tsc": "tsc",
|
|
45
46
|
"pretest": "npm run build",
|
|
46
47
|
"test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
|
|
47
48
|
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"clean_types": "../../scripts/cleanTypes.js"
|
|
49
|
+
"tsc": "tsc",
|
|
50
|
+
"unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
|
|
51
51
|
},
|
|
52
52
|
"tap": {
|
|
53
53
|
"check-coverage": false,
|
|
@@ -74,45 +74,45 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@babel/runtime": "^7.
|
|
77
|
+
"@babel/runtime": "^7.16.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@babel/cli": "^7.
|
|
81
|
-
"@babel/core": "^7.
|
|
82
|
-
"@babel/node": "^7.
|
|
83
|
-
"@babel/plugin-external-helpers": "^7.
|
|
84
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
85
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
86
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
87
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
88
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
89
|
-
"@babel/preset-env": "^7.
|
|
90
|
-
"@babel/preset-typescript": "^7.
|
|
91
|
-
"@babel/register": "^7.
|
|
80
|
+
"@babel/cli": "^7.16.0",
|
|
81
|
+
"@babel/core": "^7.16.0",
|
|
82
|
+
"@babel/node": "^7.16.0",
|
|
83
|
+
"@babel/plugin-external-helpers": "^7.16.0",
|
|
84
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
85
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
86
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
|
87
|
+
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
88
|
+
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
89
|
+
"@babel/preset-env": "^7.16.0",
|
|
90
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
91
|
+
"@babel/register": "^7.16.0",
|
|
92
92
|
"@istanbuljs/esm-loader-hook": "^0.1.2",
|
|
93
93
|
"@rollup/plugin-babel": "^5.3.0",
|
|
94
|
-
"@rollup/plugin-commonjs": "^
|
|
94
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
95
95
|
"@rollup/plugin-json": "^4.1.0",
|
|
96
|
-
"@rollup/plugin-node-resolve": "^13.0.
|
|
96
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
97
97
|
"@rollup/plugin-strip": "^2.1.0",
|
|
98
|
-
"@rollup/plugin-typescript": "^8.
|
|
99
|
-
"@types/node": "^16.
|
|
98
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
99
|
+
"@types/node": "^16.11.6",
|
|
100
100
|
"@types/tap": "^15.0.5",
|
|
101
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
102
|
-
"@typescript-eslint/parser": "^
|
|
103
|
-
"core-js": "^3.
|
|
101
|
+
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
|
102
|
+
"@typescript-eslint/parser": "^5.2.0",
|
|
103
|
+
"core-js": "^3.19.0",
|
|
104
104
|
"cross-env": "^7.0.3",
|
|
105
|
-
"eslint": "^
|
|
106
|
-
"lect": "^0.18.
|
|
107
|
-
"rollup": "^2.
|
|
105
|
+
"eslint": "^8.1.0",
|
|
106
|
+
"lect": "^0.18.3",
|
|
107
|
+
"rollup": "^2.59.0",
|
|
108
108
|
"rollup-plugin-ascii": "^0.0.3",
|
|
109
109
|
"rollup-plugin-banner": "^0.2.1",
|
|
110
110
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
111
111
|
"rollup-plugin-dts": "^4.0.0",
|
|
112
112
|
"rollup-plugin-terser": "^7.0.2",
|
|
113
|
-
"tap": "^15.0.
|
|
113
|
+
"tap": "^15.0.10",
|
|
114
114
|
"tslib": "^2.3.1",
|
|
115
|
-
"typescript": "^4.4.
|
|
115
|
+
"typescript": "^4.4.4"
|
|
116
116
|
},
|
|
117
117
|
"engines": {
|
|
118
118
|
"node": ">=12"
|