Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support RE2 #37

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ jobs:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Run commitlint
run: pnpm commitlint --from=HEAD~1
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Publish
run: pnpm publish --no-git-checks
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export const regexes = [
* Ignore Edge with EdgeHTML engine.
*/
{
regex: /Chrom(ium|e)\/(\d+)\.(\d+)(\.(\d+)|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/,
// Equivalent to /Chrom(ium|e)\/(\d+)\.(\d+)(\.(\d+)|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/
regex: /Chrom(ium|e)\/(\d+)\.(\d+)(\.(\d+)|)(\.\d+|)($|.*([^e]|[^g]e|[^d]ge|[^E]dge)\/[\d.]+$)/,
family: 'chrome',
maxVersion: [
70,
Expand Down Expand Up @@ -183,7 +184,8 @@ export const regexes = [
* Ignore IE Mobile 11
*/
{
regex: /Android:?[ /-](\d+)(\.(\d+)|)(\.(\d+)|);(?! ARM; Trident)/,
// Equivalent to /Android:?[ /-](\d+)(\.(\d+)|)(\.(\d+)|);(?! ARM; Trident)/
regex: /Android:?[ /-](\d+)(\.(\d+)|)(\.(\d+)|); ([^A]|A[^R]|AR[^M]|ARM[^;]|ARM;[^ ]|ARM; [^T]|ARM; T[^r]|ARM; Tr[^i]|ARM; Tri[^d]|ARM; Trid[^e]|ARM; Tride[^n]|ARM; Triden[^t])/,
family: 'android',
version: [
4,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"del-cli": "^5.0.0",
"eslint": "^8.25.0",
"nano-staged": "^0.8.0",
"re2": "^1.21.4",
"simple-git-hooks": "^2.8.0",
"simple-github-release": "^1.0.0",
"standard-version": "^9.5.0"
Expand Down
Loading