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
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
1,
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'no-constant-condition': 0,
},
settings: {
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"printWidth": 100,
"endOfLine": "auto",
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "auto"
"trailingComma": "es5"
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"cSpell.words": ["firewalk", "traversable"],
"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'zero', 'onum'"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Anar Kafkas
Copyright (c) 2025 Anar Kafkas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions __tests__/utils/collectionPopulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { firestore } from 'firebase-admin';

interface CollectionPopulatorBuilder<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> {
withData(
dataOrGetData: AppModelType | (() => AppModelType)
Expand All @@ -11,7 +11,7 @@ interface CollectionPopulatorBuilder<

interface CollectionPopulator<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> {
populate(opts: {
count: number;
Expand All @@ -20,7 +20,7 @@ interface CollectionPopulator<

export function collectionPopulator<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
collectionRef: firestore.CollectionReference<AppModelType, DbModelType>
): CollectionPopulatorBuilder<AppModelType, DbModelType> {
Expand Down
10 changes: 9 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// babel.config.js
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
presets: [
[
'@babel/preset-env',
{
targets: { node: 'current' },
},
],
'@babel/preset-typescript',
],
};
4 changes: 2 additions & 2 deletions examples/fastTraverser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const traverser = createTraverser(projectsColRef, {
maxConcurrentBatchCount: 20,
});
const { docCount } = await traverser.traverse(async (_, batchIndex) => {
console.log(`Gonna process batch ${batchIndex} now!`);
// ...
console.log(`Processing batch ${batchIndex} now!`);
// Add batch processing logic here
});
console.log(`Traversed ${docCount} projects super-fast!`);
Loading