Skip to content

Commit

Permalink
chore(deps): bump fastmail-masked-email to v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ajyey committed Jul 4, 2023
1 parent f9e4dec commit fec40ef
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"update-version": "node utils/update-version.js"
},
"dependencies": {
"fastmail-masked-email": "^1.3.1",
"fastmail-masked-email": "^2.0.0",
"fuse.js": "^6.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
16 changes: 8 additions & 8 deletions src/pages/popup/components/home/detail/EmailDetailPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
setFavoriteEmailIds
} from '../../../../../../utils/storageUtil';
import {
disable,
enable,
deleteEmail,
disableEmail,
enableEmail,
MaskedEmail,
MaskedEmailState,
Options,
remove,
Session,
update
updateEmail
} from 'fastmail-masked-email';
import EmailAddress from '@pages/popup/components/home/detail/EmailAddress';
import EmailDescription from '@pages/popup/components/home/detail/EmailDescription';
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function EmailDetailPane({
if (selectedEmail) {
//TODO: Add better error handling
const session = await getFastmailSession();
await remove(selectedEmail.id, session);
await deleteEmail(selectedEmail.id, session);
updateEmailInList({ ...selectedEmail, state: 'deleted' }); // Update the email in the email list
selectedEmail.state = 'deleted'; // Update the email in the email detail
closeDeleteConfirmationModal();
Expand Down Expand Up @@ -152,9 +152,9 @@ export default function EmailDetailPane({
// Make the API call to update the email state
const session = await getFastmailSession();
if (newEmailState === 'disabled') {
await disable(selectedEmail.id, session);
await disableEmail(selectedEmail.id, session);
} else if (newEmailState === 'enabled') {
await enable(selectedEmail.id, session);
await enableEmail(selectedEmail.id, session);
}
// Update the email in the list so that the changes are reflected in the email list pane
// For example, if the user is viewing the 'Enabled' emails and they disable an email,
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function EmailDetailPane({
if (updatedDomain != null) {
updateOptions['forDomain'] = updatedDomain;
}
await update(selectedEmail.id, session, updateOptions);
await updateEmail(selectedEmail.id, session, updateOptions);
selectedEmail.description =
updatedDescription ?? selectedEmail.description;
selectedEmail.forDomain = updatedDomain ?? selectedEmail.forDomain;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { create, MaskedEmail, Session } from 'fastmail-masked-email';
import { createEmail, MaskedEmail, Session } from 'fastmail-masked-email';
import { toast } from 'react-hot-toast';
import { getFastmailSession } from '../../../../../../../utils/storageUtil';
import {
Expand Down Expand Up @@ -30,7 +30,7 @@ export default function CreateEmailModal({
const handleCreate = async () => {
const session: Session = await getFastmailSession();
try {
const newEmail = await create(session, {
const newEmail = await createEmail(session, {
forDomain: domain,
description: description,
state: 'enabled'
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2707,10 +2707,10 @@ fastest-levenshtein@^1.0.16:
resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5"
integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==

fastmail-masked-email@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/fastmail-masked-email/-/fastmail-masked-email-1.3.1.tgz#007b29f13c16ad2d3851996783fbb625bc810a83"
integrity sha512-6v9g+VLG5gVs1c6rAODlLV4OBE7sxScJWewVSJj8sKBGLrE9WDF3AkXiilgJRzLQOXQWSSuBNN8C7KU8ObAy0g==
fastmail-masked-email@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fastmail-masked-email/-/fastmail-masked-email-2.0.0.tgz#f998955806d08a25132ae13f5f001e7d728b5af0"
integrity sha512-L79hPHHh4+BkCQYoBK6VsynrmejznniXdmJnIuVBtQim4UJWH+gRLl7TTC6JK8BtjdI7iIAEA8muQOL0FHemtw==
dependencies:
axios "^1.4.0"
debug "^4.3.4"
Expand Down

0 comments on commit fec40ef

Please sign in to comment.