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

Make mongodb a peer dependency #55

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e1edcae
Add support for `mongodb@6`
sebamarynissen Jan 31, 2024
52b99f6
Use promise for `toArray()`
sebamarynissen Jan 31, 2024
937be77
Make `mongodb@6` the default
sebamarynissen Jan 31, 2024
9783325
Use various mongodb clients in tests
sebamarynissen Jan 31, 2024
a9ac53c
Fix flakey tests
sebamarynissen Jan 31, 2024
2bb883f
Restore setting up mongo on GitHub actions
sebamarynissen Jan 31, 2024
84bf56a
Run tests with various mongo versions
sebamarynissen Jan 31, 2024
6617943
Update test.yml
sebamarynissen Jan 31, 2024
df75618
Update README.md
sebamarynissen Jan 31, 2024
61340ca
Update package.json
sebamarynissen Jan 31, 2024
5f7a012
Update .gitignore
sebamarynissen Jan 31, 2024
9bc27b6
Add publish to npm workflow
sebamarynissen Jan 31, 2024
ff51fea
Update test.yml
sebamarynissen Jan 31, 2024
89f8f55
Run eslint fix
sebamarynissen Jan 31, 2024
df1bd10
Fix linting errors
sebamarynissen Jan 31, 2024
35de37a
Run less tests
sebamarynissen Jan 31, 2024
b7fcc0e
Delete docs.yml
sebamarynissen Jan 31, 2024
651dc93
Run tests for 5 and 6 again
sebamarynissen Jan 31, 2024
98a6eca
Update test.yml
sebamarynissen Jan 31, 2024
b977212
Make mongodb a peer dependency
sebamarynissen Jan 31, 2024
a441cb9
Gtfo TypeScript
sebamarynissen Jan 31, 2024
495fdf3
Add mongodb as peer dependency
sebamarynissen Jan 31, 2024
308c7ce
Require mongodb for development
sebamarynissen Jan 31, 2024
b240f8f
End the TypeScript madness plz
sebamarynissen Jan 31, 2024
ecfd5b6
Revert "End the TypeScript madness plz"
sebamarynissen Jan 31, 2024
d2bb446
Update test.yml
sebamarynissen Jan 31, 2024
bc11d10
Limit tests for `mongodb@6`
sebamarynissen Jan 31, 2024
d686a8a
Update README.md
sebamarynissen Jan 31, 2024
74f0127
Output native esm
sebamarynissen Jan 31, 2024
0d10c68
Fix tests for esm output
sebamarynissen Jan 31, 2024
206f332
Set TypeScript target to es2022 again
sebamarynissen Jan 31, 2024
d743a72
Don't rely on `import.meta.dirname`
sebamarynissen Jan 31, 2024
08bde7d
Fix linting errors
sebamarynissen Jan 31, 2024
c128f41
Update README.md
sebamarynissen Jan 31, 2024
c7a8aa3
Update README.md
sebamarynissen Jan 31, 2024
6cc0685
Update README.md
sebamarynissen Jan 31, 2024
36e6e18
Merge pull request #1 from whisthub/feature/publish-to-npm
sebamarynissen Jan 31, 2024
ec89cef
Drop ts-node as dependency
sebamarynissen Jan 31, 2024
6d3e5a9
Run `npm audit fix`
sebamarynissen Jan 31, 2024
8d3deb9
Merge pull request #2 from whisthub/feature/update-deps
sebamarynissen Jan 31, 2024
24e5d89
Update npm-publish.yml
sebamarynissen Jan 31, 2024
a3cf79e
Fix flakey tests
sebamarynissen Jan 31, 2024
3ec70e3
Merge pull request #3 from whisthub/feature/fix-npm-publish
sebamarynissen Jan 31, 2024
47419f1
Update npm-publish.yml
sebamarynissen Jan 31, 2024
859ddd6
Install dependencies before tagging
sebamarynissen Jan 31, 2024
53268e5
Merge pull request #4 from whisthub/feature/fix-npm-publish
sebamarynissen Jan 31, 2024
3942c67
Ensure type declarations end up in dist
sebamarynissen Jan 31, 2024
93d1348
Merge pull request #5 from whisthub/feature/fix-output
sebamarynissen Jan 31, 2024
64b50ac
Modify for merging upstream
sebamarynissen Feb 1, 2024
ad1e5b2
Update package.json
sebamarynissen Feb 1, 2024
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
6 changes: 6 additions & 0 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ module.exports = {
project: './tsconfig.eslint.json'
},
overrides: [
{
files: ['*ts'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
},
},
{
files: ['*.test.ts'],
env: {
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4

- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -21,7 +21,6 @@ jobs:
key: ${{ runner.os }}-build-agenda-${{ hashFiles('**/package-lock.lock') }}
restore-keys: |
${{ runner.os }}-build-agenda-

- name: Update npm
run: npm -g install npm@latest

Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Run Test
name: Run tests
on: [push, pull_request, workflow_dispatch]

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
mongodb-version: [3.6, 4.4, 5.0]
node-version: [18, 20, 21]
mongodb-version: [6.0, 7.0]
steps:
- name: Git checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -23,7 +23,7 @@ jobs:
mongodb-version: ${{ matrix.mongodb-version }}

- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand All @@ -33,11 +33,8 @@ jobs:
restore-keys: |
${{ runner.os }}-build-agenda-

- name: Update npm
run: npm -g install npm@latest

- name: Install Packages
run: npm install
run: npm ci

- name: Run Lint
run: npm run lint
Expand All @@ -48,6 +45,6 @@ jobs:
CI: true

- name: Test
run: npm run test
run: npm test
env:
CI: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ docs/agenda/*
dist
.nyc_output
coverage
*.tsbuildinfo
2 changes: 1 addition & 1 deletion .mocharc.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"diff": true,
"spec": "./test/*.test.ts",
"require": ["ts-node/register", "source-map-support/register"],
"import": ["tsx/esm"],
"extension": ["js", "ts"],
"package": "./package.json",
"recursive": true,
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# AgendaTS

(full typed version of agendaJS)
# Agenda

<p align="center">
<img src="https://cdn.jsdelivr.net/gh/hokify/agenda@master/agendats.png" alt="Agenda TS" width="100" height="100">
Expand All @@ -13,7 +11,7 @@ This was originally a fork of agenda.js,
it differs from the original version in following points:

- Complete rewrite in Typescript (fully typed!)
- mongodb4 driver (supports mongodb 5.x)
- [mongodb@6](https://www.npmjs.com/package/mongodb) driver (supports mongodb 5.x and mongodb 4.x too)
- Supports mongoDB sharding by name
- touch() can have an optional progress parameter (0-100)
- Bugfixes and improvements for locking & job processing (concurrency, lockLimit,..)
Expand Down
Loading