annotate third_party/bun/node_modules/js-tokens/CHANGELOG.md @ 216:e82b80b24012 default tip

[MrJuneJune] Make webp translate background job.
author June Park <parkjune1995@gmail.com>
date Sat, 28 Feb 2026 21:04:43 -0800
parents de54585a40f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
1 ### Version 4.0.0 (2018-01-28) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
2
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
3 - Added: Support for ES2018. The only change needed was recognizing the `s`
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4 regex flag.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
5 - Changed: _All_ tokens returned by the `matchToToken` function now have a
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
6 `closed` property. It is set to `undefined` for the tokens where “closed”
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
7 doesn’t make sense. This means that all tokens objects have the same shape,
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
8 which might improve performance.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
9
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
10 These are the breaking changes:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
11
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
12 - `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
13 `['/a/s']`. (There are of course other variations of this.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
14 - Code that rely on some token objects not having the `closed` property could
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
15 now behave differently.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
16
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
17
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
18 ### Version 3.0.2 (2017-06-28) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
19
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
20 - No code changes. Just updates to the readme.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
21
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
22
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
23 ### Version 3.0.1 (2017-01-30) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
24
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
25 - Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
26 correctly.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
27
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
28
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
29 ### Version 3.0.0 (2017-01-11) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
30
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
31 This release contains one breaking change, that should [improve performance in
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
32 V8][v8-perf]:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
33
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
34 > So how can you, as a JavaScript developer, ensure that your RegExps are fast?
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
35 > If you are not interested in hooking into RegExp internals, make sure that
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
36 > neither the RegExp instance, nor its prototype is modified in order to get the
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
37 > best performance:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
38 >
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
39 > ```js
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
40 > var re = /./g;
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
41 > re.exec(''); // Fast path.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
42 > re.new_property = 'slow';
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
43 > ```
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
44
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
45 This module used to export a single regex, with `.matchToToken` bolted
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
46 on, just like in the above example. This release changes the exports of
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
47 the module to avoid this issue.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
48
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
49 Before:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
50
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
51 ```js
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
52 import jsTokens from "js-tokens"
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
53 // or:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
54 var jsTokens = require("js-tokens")
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
55 var matchToToken = jsTokens.matchToToken
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
56 ```
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
57
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
58 After:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
59
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
60 ```js
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
61 import jsTokens, {matchToToken} from "js-tokens"
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
62 // or:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
63 var jsTokens = require("js-tokens").default
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
64 var matchToToken = require("js-tokens").matchToToken
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
65 ```
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
66
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
67 [v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
68
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
69
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
70 ### Version 2.0.0 (2016-06-19) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
71
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
72 - Added: Support for ES2016. In other words, support for the `**` exponentiation
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
73 operator.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
74
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
75 These are the breaking changes:
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
76
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
77 - `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
78 - `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
79
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
80
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
81 ### Version 1.0.3 (2016-03-27) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
82
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
83 - Improved: Made the regex ever so slightly smaller.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
84 - Updated: The readme.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
85
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
86
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
87 ### Version 1.0.2 (2015-10-18) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
88
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
89 - Improved: Limited npm package contents for a smaller download. Thanks to
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
90 @zertosh!
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
91
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
92
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
93 ### Version 1.0.1 (2015-06-20) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
94
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
95 - Fixed: Declared an undeclared variable.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
96
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
97
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
98 ### Version 1.0.0 (2015-02-26) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
99
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
100 - Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
101 type is now equivalent to the Punctuator token in the ECMAScript
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
102 specification. (Backwards-incompatible change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
103 - Fixed: A `-` followed by a number is now correctly matched as a punctuator
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
104 followed by a number. It used to be matched as just a number, but there is no
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
105 such thing as negative number literals. (Possibly backwards-incompatible
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
106 change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
107
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
108
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
109 ### Version 0.4.1 (2015-02-21) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
110
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
111 - Added: Support for the regex `u` flag.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
112
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
113
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
114 ### Version 0.4.0 (2015-02-21) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
115
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
116 - Improved: `jsTokens.matchToToken` performance.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
117 - Added: Support for octal and binary number literals.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
118 - Added: Support for template strings.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
119
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
120
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
121 ### Version 0.3.1 (2015-01-06) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
122
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
123 - Fixed: Support for unicode spaces. They used to be allowed in names (which is
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
124 very confusing), and some unicode newlines were wrongly allowed in strings and
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
125 regexes.
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
126
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
127
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
128 ### Version 0.3.0 (2014-12-19) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
129
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
130 - Changed: The `jsTokens.names` array has been replaced with the
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
131 `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
132 longer part of the public API; instead use said function. See this [gist] for
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
133 an example. (Backwards-incompatible change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
134 - Changed: The empty string is now considered an “invalid” token, instead an
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
135 “empty” token (its own group). (Backwards-incompatible change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
136 - Removed: component support. (Backwards-incompatible change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
137
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
138 [gist]: https://gist.github.com/lydell/be49dbf80c382c473004
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
139
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
140
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
141 ### Version 0.2.0 (2014-06-19) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
142
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
143 - Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
144 category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
145 - Added: ES6 splats (`...`) are now matched as an operator (instead of three
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
146 punctuations). (Backwards-incompatible change.)
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
147
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
148
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
149 ### Version 0.1.0 (2014-03-08) ###
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
150
de54585a40f1 Adding bun and node modules.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
151 - Initial release.