Skip to content

Commit af6be5a

Browse files
authored
Specify ES2018 target (#287)
The tokenizer RegExp uses UNicode character class escapes, which is part of ES2018, not ES2015. See: #286
1 parent d0cf787 commit af6be5a

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
`MiniSearch` follows [semantic versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## Upcoming
6+
7+
- [fix] Correctly specify that MiniSearch targets ES9 (ES2018), not ES6
8+
(ES2015), due to the use of Unicode character class escapes in the
9+
tokenizer RegExp. Note: the README explains how to achieve ES2015
10+
compatibility.
11+
512
## v7.1.1
613

714
- [fix] Fix ability to pass the default `filter` search option in the

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,14 @@ for details about configuration options and methods.
330330

331331
## Browser and Node compatibility
332332

333-
`MiniSearch` supports all browsers and NodeJS versions implementing the ES6
334-
(ES2015) JavaScript standard. That includes all modern browsers and NodeJS
333+
`MiniSearch` supports all browsers and NodeJS versions implementing the ES9
334+
(ES2018) JavaScript standard. That includes all modern browsers and NodeJS
335335
versions.
336336

337+
ES6 (ES2015) compatibility can be achieved by transpiling the tokenizer RegExp
338+
to expand Unicode character class escapes, for example with
339+
https://babeljs.io/docs/babel-plugin-transform-unicode-sets-regex.
340+
337341
## Contributing
338342

339343
Contributions to `MiniSearch` are welcome. Please read the [contributions

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* Basic Options */
66
// "incremental": true, /* Enable incremental compilation */
7-
"target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
7+
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
88
"module": "ESNext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
99
// "lib": [], /* Specify library files to be included in the compilation. */
1010
"allowJs": true, /* Allow javascript files to be compiled. */

0 commit comments

Comments
 (0)