Skip to content

Commit

Permalink
fix: switch from bytes to @forwardemail/bytes to use thousands separa…
Browse files Browse the repository at this point in the history
…tor and unit separator
  • Loading branch information
titanism committed Aug 30, 2024
1 parent cd67e0b commit 6879c3d
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/my-account/update-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const punycode = require('node:punycode');
const RE2 = require('re2');
const Boom = require('@hapi/boom');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const isSANB = require('is-string-and-not-blank');
const { boolean } = require('boolean');
const { isPort } = require('validator');
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/web/my-account/validate-alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const Boom = require('@hapi/boom');
const RE2 = require('re2');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const isSANB = require('is-string-and-not-blank');
const slug = require('speakingurl');
const splitLines = require('split-lines');
Expand Down
2 changes: 1 addition & 1 deletion app/models/aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const Boom = require('@hapi/boom');
const RE2 = require('re2');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const captainHook = require('captain-hook');
const isFQDN = require('is-fqdn');
const isSANB = require('is-string-and-not-blank');
Expand Down
2 changes: 1 addition & 1 deletion app/models/domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { setTimeout } = require('node:timers/promises');
const Boom = require('@hapi/boom');
const RE2 = require('re2');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const cryptoRandomString = require('crypto-random-string');
const dayjs = require('dayjs-with-plugins');
const getDmarcRecord = require('mailauth/lib/dmarc/get-dmarc-record');
Expand Down
2 changes: 1 addition & 1 deletion app/models/emails.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Axe = require('axe');
const Boom = require('@hapi/boom');
const SpamScanner = require('spamscanner');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const dayjs = require('dayjs-with-plugins');
const getStream = require('get-stream');
const intoStream = require('into-stream');
Expand Down
2 changes: 1 addition & 1 deletion app/models/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Graceful = require('@ladjs/graceful');
const Redis = require('@ladjs/redis');
const _ = require('lodash');
const ansiHTML = require('ansi-html-community');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const captainHook = require('captain-hook');
const dayjs = require('dayjs-with-plugins');
const isFQDN = require('is-fqdn');
Expand Down
2 changes: 1 addition & 1 deletion app/models/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const Boom = require('@hapi/boom');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const captainHook = require('captain-hook');
const countryList = require('country-list');
const cryptoRandomString = require('crypto-random-string');
Expand Down
2 changes: 1 addition & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const path = require('node:path');
const Axe = require('axe');
const Boom = require('@hapi/boom');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const consolidate = require('@ladjs/consolidate');
const dayjs = require('dayjs-with-plugins');
const isSANB = require('is-string-and-not-blank');
Expand Down
2 changes: 1 addition & 1 deletion config/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const _ = require('lodash');
const ajc = require('array-join-conjunction');
const ansiHTML = require('ansi-html-community');
const arrayJoinConjunction = require('array-join-conjunction');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const capitalize = require('capitalize');
const dashify = require('dashify');
const dayjs = require('dayjs-with-plugins');
Expand Down
2 changes: 1 addition & 1 deletion helpers/imap/on-append.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

const { Buffer } = require('node:buffer');

const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const dayjs = require('dayjs-with-plugins');
const isHTML = require('is-html');
const mongoose = require('mongoose');
Expand Down
2 changes: 1 addition & 1 deletion helpers/message-splitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { Transform } = require('node:stream');
// Many thanks to Andris Reissman
// <https://gist.github.com/andris9/94e73deef71640322c422b27cded5add>
//
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const { Headers } = require('mailsplit');
const { Iconv } = require('iconv');

Expand Down
2 changes: 1 addition & 1 deletion helpers/monitor-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
// heapdumpOnOOM: false
// });

const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const checkDiskSpace = require('check-disk-space').default;
// const dayjs = require('dayjs-with-plugins');
const ip = require('ip');
Expand Down
2 changes: 1 addition & 1 deletion helpers/on-data-mx.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { Buffer } = require('node:buffer');

const SpamScanner = require('spamscanner');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const isSANB = require('is-string-and-not-blank');
const { SRS } = require('sender-rewriting-scheme');
const { isEmail } = require('validator');
Expand Down
2 changes: 1 addition & 1 deletion helpers/on-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const { Buffer } = require('node:buffer');

const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const getStream = require('get-stream');
const pFilter = require('p-filter');
const safeStringify = require('fast-safe-stringify');
Expand Down
2 changes: 1 addition & 1 deletion helpers/parse-payload.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { randomUUID } = require('node:crypto');
const { Headers, Splitter, Joiner } = require('mailsplit');

const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const checkDiskSpace = require('check-disk-space').default;
const dayjs = require('dayjs-with-plugins');
const getStream = require('get-stream');
Expand Down
2 changes: 1 addition & 1 deletion helpers/sync-temporary-mailbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const { Buffer } = require('node:buffer');

const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const checkDiskSpace = require('check-disk-space').default;
const ms = require('ms');
const pify = require('pify');
Expand Down
2 changes: 1 addition & 1 deletion helpers/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Redis = require('@ladjs/redis');
const _ = require('lodash');
const archiver = require('archiver');
const archiverZipEncrypted = require('archiver-zip-encrypted');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const checkDiskSpace = require('check-disk-space').default;
const dashify = require('dashify');
const getStream = require('get-stream');
Expand Down
2 changes: 1 addition & 1 deletion imap-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const os = require('node:os');

const MessageHandler = require('wildduck/lib/message-handler');
const RateLimiter = require('async-ratelimiter');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const mongoose = require('mongoose');
const pRetry = require('p-retry');
const pWaitFor = require('p-wait-for');
Expand Down
2 changes: 1 addition & 1 deletion jobs/cleanup-sqlite.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require('#config/mongoose');
const Graceful = require('@ladjs/graceful');
const Redis = require('@ladjs/redis');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const dayjs = require('dayjs-with-plugins');
const mongoose = require('mongoose');
const ms = require('ms');
Expand Down
2 changes: 1 addition & 1 deletion jobs/cleanup-tmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { parentPort } = require('node:worker_threads');
require('#config/mongoose');

const Graceful = require('@ladjs/graceful');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const ip = require('ip');
const mongoose = require('mongoose');
const ms = require('ms');
Expand Down
2 changes: 1 addition & 1 deletion mx-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

const fs = require('node:fs');

const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const ms = require('ms');
const pify = require('pify');
const { SMTPServer } = require('smtp-server');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@aws-sdk/s3-request-presigner": "3.637.0",
"@forevolve/bootstrap-dark": "4.0.2",
"@fortawesome/fontawesome-free": "5.15.4",
"@forwardemail/bytes": "4.0.0",
"@forwardemail/highlight-pug": "1.0.1",
"@forwardemail/passport-fido2-webauthn": "0.1.0",
"@forwardemail/uuid-by-string": "5.0.0",
Expand Down Expand Up @@ -99,7 +100,6 @@
"bree": "9.2.4",
"bson-objectid": "2.0.4",
"bufferutil": "4.0.8",
"bytes": "3.1.2",
"cabin": "13.2.8",
"caldav-adapter": "7.0.6",
"capitalize": "2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion smtp-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const fs = require('node:fs');

const RateLimiter = require('async-ratelimiter');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const ms = require('ms');
const pify = require('pify');
const { SMTPServer } = require('smtp-server');
Expand Down
2 changes: 1 addition & 1 deletion test/imap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { Buffer } = require('node:buffer');
const { createHash, randomUUID } = require('node:crypto');

const Axe = require('axe');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const dayjs = require('dayjs-with-plugins');
const getStream = require('get-stream');
const ip = require('ip');
Expand Down
2 changes: 1 addition & 1 deletion test/smtp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const API = require('@ladjs/api');
const Client = require('nodemailer/lib/smtp-connection');
const Redis = require('ioredis-mock');
const _ = require('lodash');
const bytes = require('bytes');
const bytes = require('@forwardemail/bytes');
const dayjs = require('dayjs-with-plugins');
const ip = require('ip');
const ms = require('ms');
Expand Down

0 comments on commit 6879c3d

Please sign in to comment.