Skip to content
Merged
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
16 changes: 9 additions & 7 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,31 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Setup
run: npm ci
run: pnpm i

- name: Build
run: npm run build
run: pnpm run build

- name: Fix Lint
run: |
npm run lint:fix
pnpm run lint:fix

- name: Lint Website
# We run the list twice to ensure that autofix works correctly
run: |
cd website
npm ci
npm run lint:fix
npm run lint:fix
pnpm i
pnpm run lint:fix
pnpm run lint:fix

- name: Build Again
run: npm run build
run: pnpm run build

- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
9 changes: 6 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Setup
run: |
npm install
npm run build
pnpm install
pnpm run build
- name: Run Coverage
run: npm run coverage
run: pnpm run coverage
- name: Publish Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Build website
run: |
npm i
npm run build
pnpm i
pnpm run build
cd website
npm i
npm run build:site
pnpm i
pnpm run build:site

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- run: |
npm i
npm run build
- run: npm run lint
pnpm i
pnpm run build
- run: pnpm run lint
- name: Lint Website
run: |
cd website
npm i
npm run lint
pnpm i
pnpm run lint
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,26 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- run: |
npm ci
npm run build
pnpm i
pnpm run build

- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.PUBLISH_NPM }}
NPM_CONFIG_PROVENANCE: true
run: npm publish ${{ env.DRY_RUN }}
run: pnpm publish ${{ env.DRY_RUN }}

- name: Publish to JSR
run: |
pnpm run build
npx jsr publish ${{ env.DRY_RUN }}

- name: Summary
uses: streetsidesoftware/actions/public/summary@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: release
uses: googleapis/release-please-action@v4
with:
release-type: node
config-file: release-please-config.json

publish:
needs: release-please
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ jobs:
# node-version: 24.x
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: node -v
- run: npm install
- run: npm run build
- run: npm run test
- run: pnpm install
- run: pnpm run build
- run: pnpm run test

test-browser-versions: # make sure build/ci work properly
runs-on: ubuntu-latest
Expand All @@ -37,10 +38,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
- run: npm install
- run: npm run build
- run: npm run test:attw #cspell:ignore attw
- run: pnpm install
- run: pnpm run build
- run: pnpm run test:attw #cspell:ignore attw
9 changes: 5 additions & 4 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
# echo "${{ toJson(github.event.inputs) }}"
- name: Checkout code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Use Node.js
uses: actions/setup-node@v4
Expand All @@ -32,12 +33,12 @@ jobs:

- name: Update Root
run: |
npm i
npx npm-check-updates --workspaces --root -t semver -u
rm -rf node_modules package-lock.json
pnpm i
pnpm up --recursive --workspace-root --dev
pnpm up --recursive --workspace-root

- name: Install
run: npm install
run: pnpm install

- name: PR Body
id: body
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist
coverage
CHANGELOG.md
website
*-lock.*
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Execute Regular Expression Matches on a Node [Worker Thread](https://nodejs.org/

Regular Expressions can suffer from [Catastrophic Backtracking](https://www.regular-expressions.info/catastrophic.html). A very simple expression like `/(x+x+)+y/` can cause your JavaScript application to freeze. This library allows you to run these expressions on another thread. If they take to long to complete, they are terminated, protecting your application from locking up.

Try it out: [`regexp-worker` Playground](https://streetsidesoftware.com/regexp-worker/)

## Installation

```
Expand Down
1 change: 1 addition & 0 deletions cspell-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Avenir
codecov
coverallsapp
dependabot
esbuild
gimsuy
lcov
nodenext
2 changes: 1 addition & 1 deletion cspell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ignorePaths": ["*.svg"],
"ignorePaths": ["*.svg", "*-lock.*"],
"useGitignore": true,
"dictionaryDefinitions": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"license": "MIT",
"dependencies": {
"regexp-worker": "file:../"
"regexp-worker": "workspace:*"
}
}
12 changes: 12 additions & 0 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@streetsidesoftware/regexp-worker",
"version": "4.1.1",
"license": "MIT",
"exports": {
".": "dist/browser.js",
"./node": "dist/index.js"
},
"publish": {
"include": ["LICENSE", "README.md", "dist/*.d.ts", "dist/browser.*", "dist/index.js"]
}
}
Loading