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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
Expand All @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- run: npm ci
- run: npm run prettier:check
Expand All @@ -37,7 +37,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
Expand All @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- run: npm ci
- run: npm test
6 changes: 6 additions & 0 deletions CHANGLOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.8.0 (2026-07-20)

- Upgrade most dependencies
- Require node 20
- Always clear the count timeout, even when an unexpected error is thrown

## 1.7.0 (2026-06-19)

- Patch rollback incorrectly restoring nested objects - https://github.com/360Learning/mongo-bulk-data-migration/pull/36
Expand Down
8 changes: 3 additions & 5 deletions __tests__/MongoBulkDataMigration.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MongoError, MongoInvalidArgumentError, ObjectId } from 'mongodb';
import { ObjectId } from 'mongodb';

import type { Collection, Db } from 'mongodb';
import { MongoBulkDataMigration, DELETE_COLLECTION } from '../src';
Expand Down Expand Up @@ -54,9 +54,7 @@ describe('MongoBulkDataMigration', () => {
const updatePromise = dataMigration.update();

await expect(updatePromise).rejects.toThrow(
new MongoInvalidArgumentError(
'Document must be a valid JavaScript object',
),
'Document must be a valid JavaScript object',
);
});

Expand All @@ -72,7 +70,7 @@ describe('MongoBulkDataMigration', () => {
const updatePromise = dataMigration.update();

await expect(updatePromise).rejects.toThrow(
new MongoError("must specify 'pipeline' when 'from' is empty"),
"must specify 'pipeline' when 'from' is empty",
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ describe('doRollbackAndAssertForInitialState', () => {
await global.db.collection('sampleCollection').deleteMany({});
});

function buildMigration(
projection: FindOptions<SampleDoc>['projection'] = { prop: 1 },
) {
function buildMigration(projection: FindOptions['projection'] = { prop: 1 }) {
const db = global.db;
const collection = 'sampleCollection';
const query = { prop: 'invalid' };
Expand Down
Loading
Loading