string-character-is-astral-surrogate 1.12.16 → 2.0.2

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 CHANGED
@@ -3,6 +3,28 @@
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
+ ## 2.0.1 (2021-09-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bump TS and separate ESLint plugins away from this monorepo ([2e07d42](https://github.com/codsen/codsen/commit/2e07d424222b6ffedf5fb45c83ad453627ec2904))
11
+
12
+ ## 2.0.0 (2021-09-09)
13
+
14
+ ### Features
15
+
16
+ - migrate to ES Modules ([8c9d95d](https://github.com/codsen/codsen/commit/8c9d95d5dea0b769c2f070397141918a4893d575))
17
+
18
+ ### BREAKING CHANGES
19
+
20
+ - programs now are in ES Modules and won't work with Common JS require()
21
+
22
+ ## 1.13.0 (2021-05-24)
23
+
24
+ ### Features
25
+
26
+ - config file based major bump blacklisting ([e15f9bb](https://github.com/codsen/codsen/commit/e15f9bba1c4fd5f847ac28b3f38fa6ee633f5dca))
27
+
6
28
  ## 1.12.15 (2021-04-11)
7
29
 
8
30
  ### Reverts
package/README.md CHANGED
@@ -26,10 +26,14 @@
26
26
 
27
27
  ## Install
28
28
 
29
+ This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required:
30
+
29
31
  ```bash
30
32
  npm i string-character-is-astral-surrogate
31
33
  ```
32
34
 
35
+ If you need a legacy version which works with `require`, use version 1.13.0
36
+
33
37
  ## Quick Take
34
38
 
35
39
  ```js
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name string-character-is-astral-surrogate
3
3
  * @fileoverview Tells, is given character a part of astral character, specifically, a high and low surrogate
4
- * @version 1.12.16
4
+ * @version 2.0.2
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-character-is-astral-surrogate/}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name string-character-is-astral-surrogate
3
3
  * @fileoverview Tells, is given character a part of astral character, specifically, a high and low surrogate
4
- * @version 1.12.16
4
+ * @version 2.0.2
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-character-is-astral-surrogate/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-character-is-astral-surrogate",
3
- "version": "1.12.16",
3
+ "version": "2.0.2",
4
4
  "description": "Tells, is given character a part of astral character, specifically, a high and low surrogate",
5
5
  "keywords": [
6
6
  "astral",
@@ -30,9 +30,11 @@
30
30
  "email": "roy@codsen.com",
31
31
  "url": "https://codsen.com"
32
32
  },
33
- "main": "dist/string-character-is-astral-surrogate.cjs.js",
34
- "module": "dist/string-character-is-astral-surrogate.esm.js",
35
- "browser": "dist/string-character-is-astral-surrogate.umd.js",
33
+ "type": "module",
34
+ "exports": {
35
+ "script": "./dist/string-character-is-astral-surrogate.umd.js",
36
+ "default": "./dist/string-character-is-astral-surrogate.esm.js"
37
+ },
36
38
  "types": "types/index.d.ts",
37
39
  "scripts": {
38
40
  "build": "rollup -c",
@@ -52,18 +54,20 @@
52
54
  "pretest": "npm run build",
53
55
  "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
54
56
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
55
- "unittest": "./node_modules/.bin/tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
57
+ "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
56
58
  "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
57
59
  "clean_types": "../../scripts/cleanTypes.js"
58
60
  },
59
61
  "tap": {
62
+ "check-coverage": false,
60
63
  "coverage-report": [
61
64
  "json-summary",
62
65
  "text"
63
66
  ],
64
- "nyc-arg": [
65
- "--exclude=**/*.cjs.js",
66
- "--exclude=**/*.umd.js"
67
+ "node-arg": [
68
+ "--no-warnings",
69
+ "--experimental-loader",
70
+ "@istanbuljs/esm-loader-hook"
67
71
  ],
68
72
  "timeout": 0
69
73
  },
@@ -79,43 +83,46 @@
79
83
  }
80
84
  },
81
85
  "dependencies": {
82
- "@babel/runtime": "^7.13.10"
86
+ "@babel/runtime": "^7.15.4"
83
87
  },
84
88
  "devDependencies": {
85
- "@babel/cli": "^7.13.14",
86
- "@babel/core": "^7.13.14",
87
- "@babel/node": "^7.13.13",
88
- "@babel/plugin-external-helpers": "^7.12.13",
89
- "@babel/plugin-proposal-class-properties": "^7.13.0",
90
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
91
- "@babel/plugin-proposal-object-rest-spread": "^7.13.8",
92
- "@babel/plugin-proposal-optional-chaining": "^7.13.12",
93
- "@babel/plugin-transform-runtime": "^7.13.10",
94
- "@babel/preset-env": "^7.13.12",
95
- "@babel/preset-typescript": "^7.13.0",
96
- "@babel/register": "^7.13.14",
89
+ "@babel/cli": "^7.15.4",
90
+ "@babel/core": "^7.15.5",
91
+ "@babel/node": "^7.15.4",
92
+ "@babel/plugin-external-helpers": "^7.14.5",
93
+ "@babel/plugin-proposal-class-properties": "^7.14.5",
94
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
95
+ "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
96
+ "@babel/plugin-proposal-optional-chaining": "^7.14.5",
97
+ "@babel/plugin-transform-runtime": "^7.15.0",
98
+ "@babel/preset-env": "^7.15.6",
99
+ "@babel/preset-typescript": "^7.15.0",
100
+ "@babel/register": "^7.15.3",
101
+ "@istanbuljs/esm-loader-hook": "^0.1.2",
97
102
  "@rollup/plugin-babel": "^5.3.0",
98
- "@rollup/plugin-commonjs": "^18.0.0",
99
- "@rollup/plugin-node-resolve": "^11.2.1",
100
- "@rollup/plugin-replace": "^2.4.2",
101
- "@rollup/plugin-strip": "^2.0.0",
102
- "@rollup/plugin-typescript": "^8.2.1",
103
- "@types/node": "^14.14.37",
104
- "@types/tap": "^14.10.3",
105
- "@typescript-eslint/eslint-plugin": "^4.20.0",
106
- "@typescript-eslint/parser": "^4.20.0",
107
- "core-js": "^3.10.0",
103
+ "@rollup/plugin-commonjs": "^20.0.0",
104
+ "@rollup/plugin-node-resolve": "^13.0.4",
105
+ "@rollup/plugin-strip": "^2.1.0",
106
+ "@rollup/plugin-typescript": "^8.2.5",
107
+ "@types/node": "^16.9.1",
108
+ "@types/tap": "^15.0.5",
109
+ "@typescript-eslint/eslint-plugin": "^4.31.0",
110
+ "@typescript-eslint/parser": "^4.31.0",
111
+ "core-js": "^3.17.3",
108
112
  "cross-env": "^7.0.3",
109
- "eslint": "^7.23.0",
110
- "lect": "^0.16.16",
111
- "rollup": "^2.44.0",
113
+ "eslint": "^7.32.0",
114
+ "lect": "^0.18.2",
115
+ "rollup": "^2.56.3",
112
116
  "rollup-plugin-ascii": "^0.0.3",
113
117
  "rollup-plugin-banner": "^0.2.1",
114
118
  "rollup-plugin-cleanup": "^3.2.1",
115
- "rollup-plugin-dts": "^3.0.1",
119
+ "rollup-plugin-dts": "^4.0.0",
116
120
  "rollup-plugin-terser": "^7.0.2",
117
- "tap": "^14.11.0",
118
- "tslib": "^2.1.0",
119
- "typescript": "^4.2.3"
121
+ "tap": "^15.0.9",
122
+ "tslib": "^2.3.1",
123
+ "typescript": "^4.4.3"
124
+ },
125
+ "engines": {
126
+ "node": ">=12"
120
127
  }
121
128
  }
@@ -1,46 +0,0 @@
1
- /**
2
- * @name string-character-is-astral-surrogate
3
- * @fileoverview Tells, is given character a part of astral character, specifically, a high and low surrogate
4
- * @version 1.12.16
5
- * @author Roy Revelt, Codsen Ltd
6
- * @license MIT
7
- * {@link https://codsen.com/os/string-character-is-astral-surrogate/}
8
- */
9
-
10
- 'use strict';
11
-
12
- Object.defineProperty(exports, '__esModule', { value: true });
13
-
14
- var _typeof = require('@babel/runtime/helpers/typeof');
15
-
16
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
-
18
- var _typeof__default = /*#__PURE__*/_interopDefaultLegacy(_typeof);
19
-
20
- function isHighSurrogate(something) {
21
- if (typeof something === "string") {
22
- if (something.length === 0) {
23
- return false;
24
- }
25
- return something.charCodeAt(0) >= 55296 && something.charCodeAt(0) <= 56319;
26
- }
27
- if (something === undefined) {
28
- return false;
29
- }
30
- throw new TypeError("string-character-is-astral-surrogate/isHighSurrogate(): the input is not string but ".concat(_typeof__default['default'](something)));
31
- }
32
- function isLowSurrogate(something) {
33
- if (typeof something === "string") {
34
- if (something.length === 0) {
35
- return false;
36
- }
37
- return something.charCodeAt(0) >= 56320 && something.charCodeAt(0) <= 57343;
38
- }
39
- if (something === undefined) {
40
- return false;
41
- }
42
- throw new TypeError("string-character-is-astral-surrogate/isLowSurrogate(): the input is not string but ".concat(_typeof__default['default'](something)));
43
- }
44
-
45
- exports.isHighSurrogate = isHighSurrogate;
46
- exports.isLowSurrogate = isLowSurrogate;
@@ -1,53 +0,0 @@
1
- /**
2
- * @name string-character-is-astral-surrogate
3
- * @fileoverview Tells, is given character a part of astral character, specifically, a high and low surrogate
4
- * @version 1.12.16
5
- * @author Roy Revelt, Codsen Ltd
6
- * @license MIT
7
- * {@link https://codsen.com/os/string-character-is-astral-surrogate/}
8
- */
9
-
10
- (function (global, factory) {
11
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
12
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
13
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.stringCharacterIsAstralSurrogate = {}));
14
- }(this, (function (exports) { 'use strict';
15
-
16
- // high surrogate goes first, low goes second
17
- function isHighSurrogate(something) {
18
- // [\uD800-\uDBFF]
19
- if (typeof something === "string") {
20
- if (something.length === 0) {
21
- return false;
22
- }
23
- // \uD800 charCode is 55296
24
- // \uDBFF charCode is 56319
25
- return something.charCodeAt(0) >= 55296 && something.charCodeAt(0) <= 56319;
26
- }
27
- if (something === undefined) {
28
- return false;
29
- }
30
- throw new TypeError(`string-character-is-astral-surrogate/isHighSurrogate(): the input is not string but ${typeof something}`);
31
- }
32
- function isLowSurrogate(something) {
33
- // [\uDC00-\uDFFF]
34
- if (typeof something === "string") {
35
- if (something.length === 0) {
36
- return false;
37
- }
38
- // \uDC00 charCode is 56320
39
- // \uDFFF charCode is 57343
40
- return something.charCodeAt(0) >= 56320 && something.charCodeAt(0) <= 57343;
41
- }
42
- if (something === undefined) {
43
- return false;
44
- }
45
- throw new TypeError(`string-character-is-astral-surrogate/isLowSurrogate(): the input is not string but ${typeof something}`);
46
- }
47
-
48
- exports.isHighSurrogate = isHighSurrogate;
49
- exports.isLowSurrogate = isLowSurrogate;
50
-
51
- Object.defineProperty(exports, '__esModule', { value: true });
52
-
53
- })));