re2 1.15.9 → 1.16.0
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/.github/actions/linux-alpine-node-12/Dockerfile +1 -1
- package/.github/actions/linux-alpine-node-14/Dockerfile +1 -1
- package/.github/actions/linux-alpine-node-15/Dockerfile +1 -1
- package/.github/actions/linux-alpine-node-15/entrypoint.sh +1 -0
- package/.github/actions/{linux-alpine-node-10 → linux-alpine-node-16}/Dockerfile +2 -2
- package/.github/actions/linux-alpine-node-16/action.yml +7 -0
- package/.github/actions/{linux-alpine-node-10 → linux-alpine-node-16}/entrypoint.sh +1 -0
- package/.github/actions/linux-node-12/Dockerfile +5 -4
- package/.github/workflows/build.yml +19 -40
- package/.github/workflows/tests.yml +1 -1
- package/README.md +4 -35
- package/binding.gyp +2 -2
- package/package.json +2 -2
- package/re2.d.ts +39 -2
- package/.github/actions/linux-alpine-node-10/action.yml +0 -7
- package/.github/actions/linux-node-10/Dockerfile +0 -14
- package/.github/actions/linux-node-10/action.yml +0 -12
- package/.github/actions/linux-node-10/entrypoint.sh +0 -15
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
FROM centos:centos7
|
|
2
2
|
|
|
3
3
|
RUN yum install -y centos-release-scl && \
|
|
4
|
-
INSTALL_PKGS="devtoolset-7-gcc devtoolset-7-gcc-c++
|
|
4
|
+
INSTALL_PKGS="devtoolset-7-gcc devtoolset-7-gcc-c++ python3 make" && \
|
|
5
5
|
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
|
|
6
6
|
rpm -V $INSTALL_PKGS && \
|
|
7
|
-
yum -y clean all --enablerepo='*'
|
|
8
|
-
|
|
9
|
-
source scl_source enable
|
|
7
|
+
yum -y clean all --enablerepo='*'
|
|
8
|
+
# && \
|
|
9
|
+
# source scl_source enable devtoolset-7 && \
|
|
10
|
+
# source scl_source enable python3
|
|
10
11
|
|
|
11
12
|
ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
|
|
12
13
|
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
strategy:
|
|
32
32
|
matrix:
|
|
33
33
|
os: [windows-latest, macOS-latest]
|
|
34
|
-
node-version: [
|
|
34
|
+
node-version: [12, 14, 15, 16]
|
|
35
35
|
|
|
36
36
|
steps:
|
|
37
37
|
- uses: actions/checkout@v2
|
|
@@ -65,40 +65,15 @@ jobs:
|
|
|
65
65
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
66
66
|
run: npm run save-to-github
|
|
67
67
|
|
|
68
|
-
build-linux-node-10:
|
|
69
|
-
name: Node.js 10 on CentOS 6
|
|
70
|
-
needs: create-release
|
|
71
|
-
runs-on: ubuntu-latest
|
|
72
|
-
|
|
73
|
-
steps:
|
|
74
|
-
- uses: actions/checkout@v2
|
|
75
|
-
with:
|
|
76
|
-
submodules: true
|
|
77
|
-
- name: Get NPM cache directory
|
|
78
|
-
id: npm-cache
|
|
79
|
-
run: |
|
|
80
|
-
echo "::set-output name=dir::$(npm config get cache)"
|
|
81
|
-
- name: Cache node modules
|
|
82
|
-
uses: actions/cache@v2
|
|
83
|
-
with:
|
|
84
|
-
path: ${{steps.npm-cache.outputs.dir}}
|
|
85
|
-
key: Linux-node-${{hashFiles('**/package-lock.json')}}
|
|
86
|
-
restore-keys: |
|
|
87
|
-
Linux-node-
|
|
88
|
-
Linux-
|
|
89
|
-
- name: Install, test, and create artifact
|
|
90
|
-
uses: ./.github/actions/linux-node-10/
|
|
91
|
-
env:
|
|
92
|
-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
93
|
-
|
|
94
68
|
build-linux-node:
|
|
95
69
|
name: Node.js ${{matrix.node-version}} on CentOS 7
|
|
96
70
|
needs: create-release
|
|
97
71
|
runs-on: ubuntu-latest
|
|
72
|
+
continue-on-error: true
|
|
98
73
|
|
|
99
74
|
strategy:
|
|
100
75
|
matrix:
|
|
101
|
-
node-version: [12, 14, 15]
|
|
76
|
+
node-version: [12, 14, 15, 16]
|
|
102
77
|
|
|
103
78
|
steps:
|
|
104
79
|
- uses: actions/checkout@v2
|
|
@@ -123,10 +98,11 @@ jobs:
|
|
|
123
98
|
with:
|
|
124
99
|
node-version: ${{matrix.node-version}}
|
|
125
100
|
|
|
126
|
-
build-linux-alpine-node-
|
|
127
|
-
name: Node.js
|
|
101
|
+
build-linux-alpine-node-12:
|
|
102
|
+
name: Node.js 12 on Alpine Linux
|
|
128
103
|
needs: create-release
|
|
129
104
|
runs-on: ubuntu-latest
|
|
105
|
+
continue-on-error: true
|
|
130
106
|
|
|
131
107
|
steps:
|
|
132
108
|
- uses: actions/checkout@v2
|
|
@@ -145,14 +121,15 @@ jobs:
|
|
|
145
121
|
Linux-Alpine-node-
|
|
146
122
|
Linux-Alpine-
|
|
147
123
|
- name: Install, test, and create artifact
|
|
148
|
-
uses: ./.github/actions/linux-alpine-node-
|
|
124
|
+
uses: ./.github/actions/linux-alpine-node-12/
|
|
149
125
|
env:
|
|
150
126
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
151
127
|
|
|
152
|
-
build-linux-alpine-node-
|
|
153
|
-
name: Node.js
|
|
128
|
+
build-linux-alpine-node-14:
|
|
129
|
+
name: Node.js 14 on Alpine Linux
|
|
154
130
|
needs: create-release
|
|
155
131
|
runs-on: ubuntu-latest
|
|
132
|
+
continue-on-error: true
|
|
156
133
|
|
|
157
134
|
steps:
|
|
158
135
|
- uses: actions/checkout@v2
|
|
@@ -171,14 +148,15 @@ jobs:
|
|
|
171
148
|
Linux-Alpine-node-
|
|
172
149
|
Linux-Alpine-
|
|
173
150
|
- name: Install, test, and create artifact
|
|
174
|
-
uses: ./.github/actions/linux-alpine-node-
|
|
151
|
+
uses: ./.github/actions/linux-alpine-node-14/
|
|
175
152
|
env:
|
|
176
153
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
177
154
|
|
|
178
|
-
build-linux-alpine-node-
|
|
179
|
-
name: Node.js
|
|
155
|
+
build-linux-alpine-node-15:
|
|
156
|
+
name: Node.js 15 on Alpine Linux
|
|
180
157
|
needs: create-release
|
|
181
158
|
runs-on: ubuntu-latest
|
|
159
|
+
continue-on-error: true
|
|
182
160
|
|
|
183
161
|
steps:
|
|
184
162
|
- uses: actions/checkout@v2
|
|
@@ -197,14 +175,15 @@ jobs:
|
|
|
197
175
|
Linux-Alpine-node-
|
|
198
176
|
Linux-Alpine-
|
|
199
177
|
- name: Install, test, and create artifact
|
|
200
|
-
uses: ./.github/actions/linux-alpine-node-
|
|
178
|
+
uses: ./.github/actions/linux-alpine-node-15/
|
|
201
179
|
env:
|
|
202
180
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
203
181
|
|
|
204
|
-
build-linux-alpine-node-
|
|
205
|
-
name: Node.js
|
|
182
|
+
build-linux-alpine-node-16:
|
|
183
|
+
name: Node.js 16 on Alpine Linux
|
|
206
184
|
needs: create-release
|
|
207
185
|
runs-on: ubuntu-latest
|
|
186
|
+
continue-on-error: true
|
|
208
187
|
|
|
209
188
|
steps:
|
|
210
189
|
- uses: actions/checkout@v2
|
|
@@ -223,6 +202,6 @@ jobs:
|
|
|
223
202
|
Linux-Alpine-node-
|
|
224
203
|
Linux-Alpine-
|
|
225
204
|
- name: Install, test, and create artifact
|
|
226
|
-
uses: ./.github/actions/linux-alpine-node-
|
|
205
|
+
uses: ./.github/actions/linux-alpine-node-16/
|
|
227
206
|
env:
|
|
228
207
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
package/README.md
CHANGED
|
@@ -211,7 +211,7 @@ For example, [yarn](https://yarnpkg.com/) is known to fail in some scenarios
|
|
|
211
211
|
|
|
212
212
|
### Precompiled artifacts
|
|
213
213
|
|
|
214
|
-
When installing re2 the [install script](
|
|
214
|
+
When installing re2 the [install script](https://github.com/uhop/install-artifact-from-github/blob/master/bin/install-from-cache.js) attempts to download a prebuilt artifact for your system from the Github releases. The download location can be overridden by setting the `RE2_DOWNLOAD_MIRROR` environment variable as seen in the install script.
|
|
215
215
|
|
|
216
216
|
If all attempts to download the prebuilt artifact for your system fails the script attempts to built re2 locally on your machine using [node-gyp](https://github.com/nodejs/node-gyp).
|
|
217
217
|
|
|
@@ -343,6 +343,7 @@ console.log('re2_res : ' + re2_res); // prints: re2_res : abc,a,b,c
|
|
|
343
343
|
|
|
344
344
|
## Release history
|
|
345
345
|
|
|
346
|
+
- 1.16.0 *Updated the compiler (thx, [Sergei Dyshel](https://github.com/sergei-dyshel)), updated GYP, removed support for Node 10, added support for Node 16, updated TS bindings (thx, [BannerBomb](https://github.com/BannerBomb)).*
|
|
346
347
|
- 1.15.9 *Updated deps.*
|
|
347
348
|
- 1.15.8 *Updated deps.*
|
|
348
349
|
- 1.15.7 *Updated deps.*
|
|
@@ -353,40 +354,8 @@ console.log('re2_res : ' + re2_res); // prints: re2_res : abc,a,b,c
|
|
|
353
354
|
- 1.15.2 *Added `linux-musl` target for precompiled images (thx [Uzlopak](https://github.com/Uzlopak)).*
|
|
354
355
|
- 1.15.1 *Refreshed dependencies, updated the verification check on installation, general maintenance.*
|
|
355
356
|
- 1.15.0 *Fix for multiline expressions (thx [Frederic Rudman](https://github.com/frudman)), `toString()` uses `source` now, updated deps.*
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
- 1.13.0 *Got rid of a single static variable to support multithreading.*
|
|
359
|
-
- 1.12.1 *Updated re2 to the latest version.*
|
|
360
|
-
- 1.12.0 *Updated the way `RE2` objects are constructed.*
|
|
361
|
-
- 1.11.0 *Updated the way to initialize the extension (thx [BannerBomb](https://github.com/BannerBomb)).*
|
|
362
|
-
- 1.10.5 *Bugfix for optional groups (thx [Josh Yudaken](https://github.com/qix)), the latest version of re2.*
|
|
363
|
-
- 1.10.4 *Technical release: even better TypeScript types (thx [Louis Brann](https://github.com/louis-brann)).*
|
|
364
|
-
- 1.10.3 *Technical release: missing reference to TS types (thx [Jamie Magee](https://github.com/JamieMagee)).*
|
|
365
|
-
- 1.10.2 *Technical release: added TypeScript types (thx [Jamie Magee](https://github.com/JamieMagee)).*
|
|
366
|
-
- 1.10.1 *Updated re2 to the latest version (thx [Jamie Magee](https://github.com/JamieMagee)), dropped Node 6.*
|
|
367
|
-
- 1.10.0 *Added back support for Node 6 and Node 8. Now Node 6-12 is supported.*
|
|
368
|
-
- 1.9.0 *Refreshed dependencies to support Node 12. Only versions 10-12 are supported now (`v8` restrictions). For older versions use `node-re2@1.8`.*
|
|
369
|
-
- 1.8.4 *Refreshed dependencies, removed `unistd.h` to compile on Windows.*
|
|
370
|
-
- 1.8.3 *Refreshed dependencies, removed suppression of some warnings.*
|
|
371
|
-
- 1.8.2 *Bugfix to support the null prototype for groups. Thx [Exter-N](https://github.com/Exter-N).*
|
|
372
|
-
- 1.8.1 *Bugfix for better source escaping.*
|
|
373
|
-
- 1.8.0 *Clarified Unicode support, added `unicode` flag, added named groups — thx [Exter-N](https://github.com/Exter-N)! Bugfixes — thx [Barak Amar](https://github.com/nopcoder).*
|
|
374
|
-
- 1.7.0 *Implemented `sticky` and `flags` + bug fixes + more tests. Thx [Exter-N](https://github.com/Exter-N).*
|
|
375
|
-
- 1.6.2 *Bugfix for a prototype access. Thx [Exter-N](https://github.com/Exter-N).*
|
|
376
|
-
- 1.6.1 *Returned support for node 4 LTS. Thx [Kannan Goundan](https://github.com/cakoose).*
|
|
377
|
-
- 1.6.0 *Added well-known symbol-based methods of ES6. Refreshed NAN.*
|
|
378
|
-
- 1.5.0 *Bugfixes, error checks, better docs. Thx [Jamie Davis](https://github.com/davisjam), and [omg](https://github.com/omg).*
|
|
379
|
-
- 1.4.1 *Minor corrections in README.*
|
|
380
|
-
- 1.4.0 *Use re2 as a git submodule. Thx [Ben James](https://github.com/benhjames).*
|
|
381
|
-
- 1.3.3 *Refreshed dependencies.*
|
|
382
|
-
- 1.3.2 *Updated references in README (re2 was moved to github).*
|
|
383
|
-
- 1.3.1 *Refreshed dependencies, new Travis-CI config.*
|
|
384
|
-
- 1.3.0 *Upgraded NAN to 1.6.3, now we support node.js 0.10.36, 0.12.0, and io.js 1.3.0. Thx [Reid Burke](https://github.com/reid)!*
|
|
385
|
-
- 1.2.0 *Documented getUtfXLength() functions. Added support for `\c` and `\u` commands.*
|
|
386
|
-
- 1.1.1 *Minor corrections in README.*
|
|
387
|
-
- 1.1.0 *Buffer-based API is public. Unicode is fully supported.*
|
|
388
|
-
- 1.0.0 *Implemented all `RegExp` methods, and all relevant `String` methods.*
|
|
389
|
-
- 0.9.0 *The initial public release.*
|
|
357
|
+
|
|
358
|
+
The rest can be consulted in the project's wiki [Release history](https://github.com/uhop/node-re2/wiki/Release-history).
|
|
390
359
|
|
|
391
360
|
## License
|
|
392
361
|
|
package/binding.gyp
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"vendor/util/strutil.cc"
|
|
40
40
|
],
|
|
41
41
|
"cflags": [
|
|
42
|
-
"-std=c++
|
|
42
|
+
"-std=c++14",
|
|
43
43
|
"-Wall",
|
|
44
44
|
"-Wextra",
|
|
45
45
|
"-Wno-sign-compare",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"CLANG_CXX_LANGUAGE_STANDARD": "c++11",
|
|
63
63
|
"CLANG_CXX_LIBRARY": "libc++",
|
|
64
64
|
"OTHER_CFLAGS": [
|
|
65
|
-
"-std=c++
|
|
65
|
+
"-std=c++14",
|
|
66
66
|
"-Wall",
|
|
67
67
|
"-Wextra",
|
|
68
68
|
"-Wno-sign-compare",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "re2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Bindings for RE2: fast, safe alternative to backtracking regular expression engines.",
|
|
5
5
|
"homepage": "https://github.com/uhop/node-re2",
|
|
6
6
|
"bugs": "https://github.com/uhop/node-re2/issues",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"install-artifact-from-github": "^1.2.0",
|
|
14
14
|
"nan": "^2.14.2",
|
|
15
|
-
"node-gyp": "^
|
|
15
|
+
"node-gyp": "^8.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"heya-unit": "^0.3.0"
|
package/re2.d.ts
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
declare module 're2' {
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
interface RE2MatchArray<K> extends Array<K> {
|
|
4
|
+
index?: number;
|
|
5
|
+
input?: K;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface RE2ExecArray<K> extends Array<K> {
|
|
9
|
+
index: number;
|
|
10
|
+
input: K;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface RE2 extends RegExp {
|
|
14
|
+
exec<K extends String | Buffer>(str: K): RE2ExecArray<K> | null;
|
|
15
|
+
|
|
16
|
+
test(str: string | Buffer): boolean;
|
|
17
|
+
|
|
18
|
+
match<K extends String | Buffer>(str: K): RE2MatchArray<K> | null;
|
|
19
|
+
|
|
20
|
+
replace<K extends String | Buffer>(str: K, replaceValue: string | Buffer): K;
|
|
21
|
+
replace<K extends String | Buffer>(str: K, replacer: (substring: string, ...args: any[]) => string | Buffer): K;
|
|
22
|
+
|
|
23
|
+
search(str: string | Buffer): number;
|
|
24
|
+
|
|
25
|
+
split<K extends String | Buffer>(str: K, limit?: number): K[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface RE2Constructor extends RegExpConstructor {
|
|
29
|
+
new(pattern: Buffer | RegExp | string): RE2;
|
|
30
|
+
new(pattern: Buffer | string, flags?: string): RE2;
|
|
31
|
+
(pattern: Buffer | RegExp | string): RE2;
|
|
32
|
+
(pattern: Buffer | string, flags?: string): RE2;
|
|
33
|
+
readonly prototype: RE2;
|
|
34
|
+
|
|
35
|
+
unicodeWarningLevel: 'nothing' | 'warnOnce' | 'warn' | 'throw';
|
|
36
|
+
getUtf8Length(value: string): number;
|
|
37
|
+
getUtf16Length(value: Buffer): number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var RE2: RE2Constructor;
|
|
3
41
|
export = RE2;
|
|
4
42
|
}
|
|
5
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
FROM centos:centos6
|
|
2
|
-
|
|
3
|
-
RUN yum install -y centos-release-scl && \
|
|
4
|
-
INSTALL_PKGS="devtoolset-7-gcc devtoolset-7-gcc-c++ python27 python-argparse" && \
|
|
5
|
-
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
|
|
6
|
-
rpm -V $INSTALL_PKGS && \
|
|
7
|
-
yum -y clean all --enablerepo='*' && \
|
|
8
|
-
source scl_source enable devtoolset-7 && \
|
|
9
|
-
source scl_source enable python27
|
|
10
|
-
|
|
11
|
-
ENV PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
|
|
12
|
-
|
|
13
|
-
COPY entrypoint.sh /entrypoint.sh
|
|
14
|
-
ENTRYPOINT ["/entrypoint.sh"]
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
name: 'Create a binary artifact for Node 10 on Linux'
|
|
2
|
-
description: 'Create a binary artifact for Node 10 on Linux using CentOS6 and glibc 2.12'
|
|
3
|
-
inputs:
|
|
4
|
-
node-version:
|
|
5
|
-
description: 'Node.js version'
|
|
6
|
-
required: false
|
|
7
|
-
default: '10'
|
|
8
|
-
runs:
|
|
9
|
-
using: 'docker'
|
|
10
|
-
image: 'Dockerfile'
|
|
11
|
-
args:
|
|
12
|
-
- ${{inputs.node-version}}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/bin/bash -l
|
|
2
|
-
|
|
3
|
-
NVM_DIR=$HOME/.nvm
|
|
4
|
-
|
|
5
|
-
curl -sS -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
|
|
6
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
7
|
-
|
|
8
|
-
nvm install --no-progress $1
|
|
9
|
-
|
|
10
|
-
npm config set unsafe-perm true
|
|
11
|
-
export DEVELOPMENT_SKIP_GETTING_ASSET=true
|
|
12
|
-
npm i
|
|
13
|
-
npm run build --if-present
|
|
14
|
-
npm test
|
|
15
|
-
npm run save-to-github
|