Skip to content

Commit 94b699a

Browse files
Merge branch 'release/2.0.2' into main
2 parents 13d3c94 + 97ddc54 commit 94b699a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+319
-434
lines changed

src/.babelrc renamed to .babelrc

File renamed without changes.

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ end_of_line = lf
99
insert_final_newline = true
1010
indent_style = tab
1111

12+
[*.yml]
13+
indent_style = space
14+
indent_size = 2
15+
1216
[{package.json,package-lock.json}]
1317
indent_style = space
1418
indent_size = 2

.eslintrc.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"plugin:jest/recommended",
66
"plugin:@typescript-eslint/eslint-recommended",
77
"plugin:@typescript-eslint/recommended",
8-
"prettier",
9-
"prettier/@typescript-eslint"
8+
"prettier"
109
],
1110
"parserOptions": {
12-
"ecmaVersion": 2018
11+
"ecmaVersion": 2018,
12+
"project": ["./**/tsconfig.json", "./**/tsconfig.test.json"]
1313
},
1414
"rules": {
1515
"import/extensions": [
@@ -22,7 +22,7 @@
2222
"import/no-extraneous-dependencies": [
2323
"error",
2424
{
25-
"devDependencies": ["**/*.spec.{js,ts}", "**/jest.config.js"]
25+
"devDependencies": ["**/*.spec.{js,ts}", "**/*.config.js"]
2626
}
2727
],
2828
"import/no-unresolved": [
@@ -49,7 +49,8 @@
4949
"LabeledStatement",
5050
"WithStatement"
5151
],
52-
"@typescript-eslint/explicit-function-return-type": "off"
52+
"@typescript-eslint/explicit-function-return-type": "off",
53+
"@typescript-eslint/explicit-module-boundary-types": "off"
5354
},
5455
"settings": {
5556
"import/parsers": {

.github/workflows/security-scan.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
schedule:
9+
# 10:17 on Fridays
10+
- cron: '17 10 * * 5'
11+
workflow_dispatch:
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: ['javascript']
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@v1
29+
with:
30+
languages: ${{ matrix.language }}
31+
32+
- name: Autobuild
33+
uses: github/codeql-action/autobuild@v1
34+
35+
- name: Perform CodeQL Analysis
36+
uses: github/codeql-action/analyze@v1

.github/workflows/tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
schedule:
9+
# 00:00 on Saturdays
10+
- cron: '0 0 * * SAT'
11+
workflow_dispatch:
12+
13+
jobs:
14+
test:
15+
name: Test
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
node-version: [10.x, 14.x]
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
with:
27+
fetch-depth: '2'
28+
29+
- name: Test on Node ${{ matrix.node-version }}
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
34+
- run: npm install
35+
- run: npm run lint
36+
- run: npm run build
37+
- run: npm run test
38+
- run: npx testpack-cli --keep={@babel/*,ts-jest,typescript} .babelrc tsconfig*.json src/e2e.spec.ts
39+
40+
- name: Upload test coverage report to Codecov
41+
uses: codecov/codecov-action@v1
42+
with:
43+
fail_ci_if_error: true
44+
45+
- name: Run Snyk to check for vulnerabilities
46+
uses: snyk/actions/node@master
47+
env:
48+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.publishrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"uncommittedChanges": true,
55
"untrackedFiles": true,
66
"sensitiveData": true,
7-
"branch": "master",
7+
"branch": "main",
88
"gitTag": true
99
},
1010
"confirm": true,

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[![npm package](https://badge.fury.io/js/regex-to-strings.svg)](https://badge.fury.io/js/regex-to-strings)
44
![node version](https://img.shields.io/node/v/regex-to-strings.svg)
55
![npm type definitions](https://img.shields.io/npm/types/regex-to-strings)
6-
[![Build Status](https://travis-ci.org/wimpyprogrammer/regex-to-strings.svg?branch=master)](https://travis-ci.org/wimpyprogrammer/regex-to-strings)
7-
[![codecov](https://codecov.io/gh/wimpyprogrammer/regex-to-strings/branch/master/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/regex-to-strings)
6+
![Tests](https://github.com/wimpyprogrammer/regex-to-strings/workflows/Tests/badge.svg)
7+
[![codecov](https://codecov.io/gh/wimpyprogrammer/regex-to-strings/branch/main/graph/badge.svg)](https://codecov.io/gh/wimpyprogrammer/regex-to-strings)
88
[![Known Vulnerabilities](https://snyk.io/test/github/wimpyprogrammer/regex-to-strings/badge.svg)](https://snyk.io/test/github/wimpyprogrammer/regex-to-strings)
99

1010
Generate strings that match a Regular Expression pattern. Efficiently generate all possible matches, or only the quantity you need.
@@ -108,7 +108,7 @@ console.log(strings); // ['6', '5', '0', '2', '7', '9', '4', '3', '1', '8']
108108

109109
`regex-to-strings` uses [`regexp-tree`](https://www.npmjs.com/package/regexp-tree) to parse your Regular Expression, and so the Regular Expression syntax you can use is largely determined by that library. If your pattern is not recognized by `regex-to-strings`, [try parsing it with `regexp-tree`](https://astexplorer.net/#/gist/4ea2b52f0e546af6fb14f9b2f5671c1c/39b55944da3e5782396ffa1fea3ba68d126cd394) to see if the syntax is supported.
110110

111-
`regex-to-strings` also includes [extensive positive **and** negative tests](https://github.com/wimpyprogrammer/regex-to-strings/blob/master/src/pattern.spec.ts) that track which Regular Expression features are supported.
111+
`regex-to-strings` also includes [extensive positive **and** negative tests](https://github.com/wimpyprogrammer/regex-to-strings/blob/main/src/pattern.spec.ts) that track which Regular Expression features are supported.
112112

113113
### Regular Expressions with unbounded repetition
114114

demo/src/components/demo-form.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export default class DemoForm {
2727
protected $errorContainer: HTMLDivElement;
2828
protected $errorMessage: HTMLPreElement;
2929

30+
// eslint-disable-next-line @typescript-eslint/no-empty-function
3031
public onSubmit: () => void = () => {};
32+
// eslint-disable-next-line @typescript-eslint/no-empty-function
3133
public onCancel: () => void = () => {};
3234

3335
private onInputKeydown(event: KeyboardEvent): boolean {

demo/src/components/demo-output.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export default class DemoOutput {
3232

3333
if (isBlockOutput) {
3434
this.$expansions.innerHTML = expansions
35-
.map(string => `<div class="alert alert-light">${escape(string)}</div>`)
35+
.map((value) => `<div class="alert alert-light">${escape(value)}</div>`)
3636
.join('\n');
3737
} else {
3838
this.$expansions.innerHTML = expansions
39-
.map(string => `<span>${escape(string)}</span>`)
39+
.map((value) => `<span>${escape(value)}</span>`)
4040
.join(delimiter);
4141
}
4242

0 commit comments

Comments
 (0)