From 130032621dc4a58a378530694496bb3dc2002d5a Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 13 May 2024 21:16:23 -0400 Subject: [PATCH 01/53] make helper for subtree mutationobservers that handle mutations serially --- extension/data/util/dom.ts | 40 +++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/extension/data/util/dom.ts b/extension/data/util/dom.ts index 758e41195..d4c26024e 100644 --- a/extension/data/util/dom.ts +++ b/extension/data/util/dom.ts @@ -16,28 +16,50 @@ export const documentInteractive = new Promise(resolve => { } }); +/** + * Creates a long-lived {@linkcode MutationObserver} which observes mutations to + * some node's subtree and calls a callback for each individual mutation record + * that is observed. + * @param target The element to observe. + * @param options Mutation observer options. This convenience function defaults + * the `subtree` option to `true`; all others are passed through as-is. + * @param callback A function called for each observed + * {@linkcode MutationRecord}. + * @returns The created {@linkcode MutationObserver}. + */ +export function observeSubtree ( + target: Node, + options: MutationObserverInit = {}, + callback: (record: MutationRecord) => void, +) { + let observer = new MutationObserver(records => records.forEach(record => callback(record))); + observer.observe(target, {subtree: true, ...options}); + return observer; +} + // Keep a list of all the handlers we haven't run yet let pendingElementHandlers: [el: HTMLElement, handler: () => void][] = []; -/** Registers a function to run when the given element appears in the DOM. */ +/** + * Registers a function to run when the given element appears in the DOM. + */ export function onDOMAttach (el: HTMLElement, handler: () => void) { pendingElementHandlers.push([el, handler]); } // watch for elements being added to the DOM -new MutationObserver(() => { +observeSubtree(document, {childList: true}, record => { // go through the array and see if each element is present yet pendingElementHandlers = pendingElementHandlers.filter(([el, handler]) => { - if (document.contains(el)) { - // element is on the page, call its handler and remove from array - handler(); - return false; + for (const addedNode of record.addedNodes ?? []) { + if (addedNode === el || addedNode.contains(el)) { + // element is on page, call its handler and remove from array + handler(); + return false; + } } // element is not on page yet, keep it in the array return true; }); -}).observe(document, { - childList: true, - subtree: true, }); From 755cb1feb6af30b696f8fbb344567c855b4f1204 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 13 May 2024 21:36:17 -0400 Subject: [PATCH 02/53] just uh. just kinda shove it all in there i guess --- extension/data/frontends/index.tsx | 139 +++++++++++++++++++++ extension/data/frontends/modmail.ts | 8 ++ extension/data/frontends/newreddit.ts | 168 ++++++++++++++++++++++++++ extension/data/frontends/oldreddit.ts | 8 ++ extension/data/frontends/shreddit.ts | 8 ++ extension/data/modules/modnotes.jsx | 152 ++++++++++------------- 6 files changed, 395 insertions(+), 88 deletions(-) create mode 100644 extension/data/frontends/index.tsx create mode 100644 extension/data/frontends/modmail.ts create mode 100644 extension/data/frontends/newreddit.ts create mode 100644 extension/data/frontends/oldreddit.ts create mode 100644 extension/data/frontends/shreddit.ts diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx new file mode 100644 index 000000000..dc1249e88 --- /dev/null +++ b/extension/data/frontends/index.tsx @@ -0,0 +1,139 @@ +// Defines a system of "slots" (distinct from React slots) which modules can +// use to render interface elements within the page. Slot locations are +// standardized for consumers (e.g. a module says it wants to display a button +// next to comment author usernames) and their actual position in the DOM is +// controlled by platform-specific observers responding to changes in the page. + +// TODO: this file probably needs to be explained a lot better im in +// functionality hyperfocus mode not documentation hyperfocus mode + +import {type ComponentType} from 'react'; + +import {currentPlatform, RedditPlatform} from '../util/platform'; +import {reactRenderer} from '../util/ui_interop'; + +import modmailObserver from './modmail'; +import newRedditObserver from './newreddit'; +import oldRedditObserver from './oldreddit'; +import shredditObserver from './shreddit'; + +// FIXME: document all of these +interface PlatformSlotDetailsSubreddit { + fullname?: string; + name: string; +} + +export type PlatformSlotDetailsUser = { + deleted: true; +} | { + deleted: false; + fullname?: string; + name: string; +}; + +interface PlatformSlotDetailsSubmission { + fullname: string; +} + +interface PlatformSlotDetailsComment { + fullname: string; +} + +// Slot names and the type of associated contextual information +// FIXME: document +export interface PlatformSlotDetails { + submissionAuthor: { + user: PlatformSlotDetailsUser; + submission?: PlatformSlotDetailsSubmission; + subreddit: PlatformSlotDetailsSubreddit; + distinguishType: null | 'moderator' | 'employee' | 'alumnus'; + stickied: boolean; + }; + commentAuthor: { + user: PlatformSlotDetailsUser; + comment: PlatformSlotDetailsComment; + submission?: PlatformSlotDetailsSubmission; + subreddit: PlatformSlotDetailsSubreddit; + distinguished: boolean; + stickied: boolean; + }; + modmailAuthor: { + user: PlatformSlotDetailsUser; + subreddit: PlatformSlotDetailsSubreddit; + authorIsModerator: boolean; + repliedAsSubreddit: boolean; + }; +} +export type PlatformSlotLocation = keyof PlatformSlotDetails; + +// Consumer code (used by toolbox modules) + +// A consumer of a particular slot location which gets appropriate context and +// returns React content to be rendered in the slot +export type PlatformSlotContent = ComponentType<{ + details: PlatformSlotDetails[Location]; + location: Location; +}>; + +// Map of slot locations to consumers of the slot +const slotConsumers: { + [K in keyof PlatformSlotDetails]?: PlatformSlotContent[]; +} = Object.create(null); + +// FIXME: document +export function renderInSlots (locations: K[], render: PlatformSlotContent) { + if (!Array.isArray(locations)) { + locations = []; + } + for (const location of locations) { + if (!slotConsumers[location]) { + slotConsumers[location] = []; + } + slotConsumers[location]?.push(render); + } +} + +// Observer code (used by platform-specific observers in this directory) + +// FIXME: document +export type PlatformObserver = ( + /** + * Creates a React root for a slot which will be populated with the + * appropriate contents. Observers are responsible for calling this function + * and inserting the resulting element into the DOM wherever the slot should + * be rendered. + */ + createRenderer: ( + location: Location, + details: PlatformSlotDetails[Location], + ) => HTMLElement, +) => void; + +// the actual `createRenderer` function observers get - returns a new react root +// which will contain all the contents different modules have registered for the +// given slot location +const createRenderer = (location: K, details: PlatformSlotDetails[K]) => + reactRenderer( +
+ {/* TODO: Do we want to do anything more sophisticated here? */} + {slotConsumers[location]?.map(Component => )} +
, + ); + +// Initialize the appropriate observer for the platform we've loaded into +// FIXME: this should really not be done here. export a function that does this +// and have it get called from init.ts only if load conditions pass +let observers = { + [RedditPlatform.OLD]: oldRedditObserver, + [RedditPlatform.NEW]: newRedditObserver, + [RedditPlatform.SHREDDIT]: shredditObserver, + [RedditPlatform.MODMAIL]: modmailObserver, +}; +if (currentPlatform != null) { + let observer = observers[currentPlatform]; + observer(createRenderer); +} diff --git a/extension/data/frontends/modmail.ts b/extension/data/frontends/modmail.ts new file mode 100644 index 000000000..33b49f917 --- /dev/null +++ b/extension/data/frontends/modmail.ts @@ -0,0 +1,8 @@ +import TBLog from '../tblog'; +import {PlatformObserver} from '.'; + +const log = TBLog('observe:modmail'); + +export default (() => { + log.warn('Modmail observer not yet implemented'); +}) satisfies PlatformObserver; diff --git a/extension/data/frontends/newreddit.ts b/extension/data/frontends/newreddit.ts new file mode 100644 index 000000000..eb43b84b2 --- /dev/null +++ b/extension/data/frontends/newreddit.ts @@ -0,0 +1,168 @@ +// Frontend observer for new Reddit, implemented against jsAPI. + +import TBLog from '../tblog'; +import {type PlatformObserver, PlatformSlotDetails} from '.'; + +const log = TBLog('observer:new'); + +interface JSAPISubreddit { + id: string; + name: string; + type: string; +} +interface JSAPIEvent extends CustomEvent { + target: HTMLElement; + // NOTE: Initial list pulled from https://reddit.com/r/redesign/wiki/jsapi. + // This list is probably imperfect and we should cross-reference + // TBListener instead of relying on that but I'm lazy + detail: { + type: 'post'; + data: { + author: string; + distinguishType: string | null | undefined; + flair: unknown[]; + id: string; + media: unknown; + permalink: string; + subreddit: JSAPISubreddit; + }; + } | { + type: 'subreddit'; + data: { + id: string; + displayText: string; + name: string; + title: string; + url: string; + }; + } | { + type: 'postAuthor'; + data: { + author: string; + isModerator: boolean; + post: { + id: string; + }; + subreddit: JSAPISubreddit; + }; + } | { + type: 'comment'; + data: { + author: string; + body: string; + distinguishType: string | null; + id: string; + isStickied: boolean; + isTopLevel: boolean; + post: { + id: string; + }; + subreddit: JSAPISubreddit; + }; + } | { + type: 'commentAuthor'; + data: { + author: string; + isModerator: boolean; + comment: { + id: string; + }; + post: { + id: string; + }; + subreddit: JSAPISubreddit; + }; + } | { + type: 'userHovercard'; + data: { + user: { + username: string; + commentKarma: number; + hasUserProfile: boolean; + displayName: string; + created: number; + iconSize: number[]; + postKarma: number; + isFollowing: null; + accountIcon: string; + isEmployee: boolean; + url: string; + bannerImage: string; + hasVerifiedEmail: boolean; + id: string; + }; + contextId: string; + subreddit: JSAPISubreddit; + }; + }; +} + +type SlotRenderArgs = [K, PlatformSlotDetails[K]]; + +/** Maps data received from jsAPI events into standardized slot data. */ +function mapEvent (event: JSAPIEvent): SlotRenderArgs | null { + if (event.detail.type === 'postAuthor') { + return ['submissionAuthor', { + user: event.detail.data.author === '[deleted]' ? {deleted: true} : { + deleted: false, + name: event.detail.data.author, + }, + subreddit: { + name: event.detail.data.subreddit.name, + fullname: event.detail.data.subreddit.id, + }, + submission: { + fullname: event.detail.data.post.id, + }, + distinguishType: null, // TODO + stickied: false, // TODO + }]; + } + if (event.detail.type === 'commentAuthor') { + return ['commentAuthor', { + user: event.detail.data.author === '[deleted]' ? {deleted: true} : { + deleted: false, + name: event.detail.data.author, + }, + comment: { + fullname: event.detail.data.comment.id, + }, + subreddit: { + fullname: event.detail.data.subreddit.id, + name: event.detail.data.subreddit.name, + }, + distinguishType: null, // TODO + stickied: false, // TODO + }]; + } + + return null; +} + +export default (createRenderer => { + document.addEventListener('reddit', event => { + const e = event as JSAPIEvent; // life's too short to worry about this + + const target = e.target?.querySelector('[data-name="toolbox"]'); + if (!target || target.classList.contains('tb-target-seen')) { + return; + } + + target.classList.add('tb-target-seen'); + log.debug('saw new jsAPI event:', target, e.detail); + + let renderOptions = mapEvent(e); + if (!renderOptions) { + return; + } + target.appendChild(createRenderer(...renderOptions)); + }, true); + + const meta = document.createElement('meta'); + meta.name = 'jsapi.consumer'; + // TODO: this can be changed back to just `toolbox` once TBListener is gone + meta.content = 'toolbox-platform-observer'; + document.head.appendChild(meta); + meta.dispatchEvent(new CustomEvent('reddit.ready')); + log.info('Connected to jsAPI'); +}) satisfies PlatformObserver; diff --git a/extension/data/frontends/oldreddit.ts b/extension/data/frontends/oldreddit.ts new file mode 100644 index 000000000..f2d11d69a --- /dev/null +++ b/extension/data/frontends/oldreddit.ts @@ -0,0 +1,8 @@ +import TBLog from '../tblog'; +import {PlatformObserver} from '.'; + +const log = TBLog('observe:old'); + +export default (() => { + log.warn('Modmail observer not yet implemented'); +}) satisfies PlatformObserver; diff --git a/extension/data/frontends/shreddit.ts b/extension/data/frontends/shreddit.ts new file mode 100644 index 000000000..4381a8d7e --- /dev/null +++ b/extension/data/frontends/shreddit.ts @@ -0,0 +1,8 @@ +import TBLog from '../tblog'; +import {PlatformObserver} from '.'; + +const log = TBLog('observe:shreddit'); + +export default (() => { + log.warn('Modmail observer not yet implemented'); +}) satisfies PlatformObserver; diff --git a/extension/data/modules/modnotes.jsx b/extension/data/modules/modnotes.jsx index aa1dd4aef..ae2946c08 100644 --- a/extension/data/modules/modnotes.jsx +++ b/extension/data/modules/modnotes.jsx @@ -1,12 +1,9 @@ -import $ from 'jquery'; - import {map, page, pipeAsync} from 'iter-ops'; import {useFetched, useSetting} from '../hooks.ts'; import * as TBApi from '../tbapi.ts'; -import {isModSub, isNewModmail, link} from '../tbcore.js'; +import {isModSub, link} from '../tbcore.js'; import {escapeHTML} from '../tbhelpers.js'; -import TBListener from '../tblistener.js'; import TBLog from '../tblog.ts'; import {Module} from '../tbmodule.jsx'; import {setSettingAsync} from '../tbstorage.js'; @@ -20,7 +17,7 @@ import {RelativeTime} from '../components/controls/RelativeTime.tsx'; import {ProgressivePager} from '../components/ProgressivePager.tsx'; import {Window} from '../components/Window.tsx'; import {WindowTabs} from '../components/WindowTabs.tsx'; -import {reactRenderer} from '../util/ui_interop.tsx'; +import {renderInSlots} from '../frontends/index.tsx'; const log = TBLog('ModNotes'); @@ -550,62 +547,6 @@ function NoteTableRow ({note, onDelete}) { ); } -const ModNotesUserRoot = ({user, subreddit, contextID}) => { - // Get settings - const defaultTabName = useSetting('ModNotes', 'defaultTabName', 'all_activity'); - const defaultNoteLabel = useSetting('ModNotes', 'defaultNoteLabel', 'none'); - - // Fetch the latest note for the user - const note = useFetched(getLatestModNote(subreddit, user)); - - const [popupShown, setPopupShown] = useState(false); - const [popupClickEvent, setPopupClickEvent] = useState(null); - - /** @type {{top: number; left: number} | undefined} */ - let initialPosition = undefined; - if (popupClickEvent) { - const positions = drawPosition(popupClickEvent); - initialPosition = { - top: positions.topPosition, - left: positions.leftPosition, - }; - } - - function showPopup (event) { - setPopupShown(true); - setPopupClickEvent(event); - } - - function hidePopup () { - setPopupShown(false); - setPopupClickEvent(null); - } - - return ( - <> - - {popupShown && createPortal( - , - document.body, - )} - - ); -}; - export default new Module({ name: 'Mod Notes', id: 'ModNotes', @@ -640,41 +581,76 @@ export default new Module({ setSettingAsync(this.id, 'cachedParentFullnames', undefined); // Handle authors showing up on the page - TBListener.on('author', async e => { - const subreddit = e.detail.data.subreddit.name; - const author = e.detail.data.author; - const contextID = isNewModmail ? undefined : e.detail.data.comment?.id || e.detail.data.post?.id; + renderInSlots([ + 'commentAuthor', + 'submissionAuthor', + 'modmailAuthor', + ], ({details}) => { + const subreddit = details.subreddit.name; + const user = !details.user.deleted && details.user.name; + const contextID = details.comment?.id || details.submission?.id || null; - // Deleted users can't have notes - if (author === '[deleted]') { - return; - } + const isMod = useFetched(isModSub(details.subreddit.name)); + + // Get settings + const defaultTabName = useSetting('ModNotes', 'defaultTabName', 'all_activity'); + const defaultNoteLabel = useSetting('ModNotes', 'defaultNoteLabel', 'none'); + + // Fetch the latest note for the user + const note = useFetched(getLatestModNote(subreddit, user)); - // Can't fetch notes in a sub you're not a mod of + const [popupShown, setPopupShown] = useState(false); + const [popupClickEvent, setPopupClickEvent] = useState(null); + + // Need to know where we are and who we're looking at, and can't fetch + // notes in a sub you're not a mod of // TODO: What specific permissions are required to fetch notes? - const isMod = await isModSub(subreddit); - if (!isMod) { - return; + if (!subreddit || !user || !isMod) { + return <>; } - // Return early if we don't have the things we need - if (!e.detail.data.subreddit.name || !e.detail.data.author) { - return; + /** @type {{top: number; left: number} | undefined} */ + let initialPosition = undefined; + if (popupClickEvent) { + const positions = drawPosition(popupClickEvent); + initialPosition = { + top: positions.topPosition, + left: positions.leftPosition, + }; } - // Display badge for notes if not already present - const $target = $(e.target); - if ($target.find('.tb-modnote-badge-react-root').length) { - return; + function showPopup (event) { + setPopupShown(true); + setPopupClickEvent(event); + } + + function hidePopup () { + setPopupShown(false); + setPopupClickEvent(null); } - const badgeRoot = reactRenderer( - , + + return ( + <> + + {popupShown && createPortal( + , + document.body, + )} + ); - badgeRoot.classList.add('tb-modnote-badge-react-root'); - $target.append(badgeRoot); }); }); From 3dc35da754c6b18295243891114908be711a7c5a Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 13 May 2024 21:37:46 -0400 Subject: [PATCH 03/53] erin react doesnt even have slots what does this comment mean --- extension/data/frontends/index.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx index dc1249e88..bbf2f87e0 100644 --- a/extension/data/frontends/index.tsx +++ b/extension/data/frontends/index.tsx @@ -1,8 +1,9 @@ -// Defines a system of "slots" (distinct from React slots) which modules can -// use to render interface elements within the page. Slot locations are -// standardized for consumers (e.g. a module says it wants to display a button -// next to comment author usernames) and their actual position in the DOM is -// controlled by platform-specific observers responding to changes in the page. +// Defines a system of "slots" which modules can use to render interface +// elements within the page. Slot locations are standardized for consumers (e.g. +// a module says it wants to display a button next to comment author usernames) +// and their actual position in the DOM is controlled by platform-specific +// observers responding to changes in the page and dynamically creating React +// roots which this code then populates with the appropriate contents. // TODO: this file probably needs to be explained a lot better im in // functionality hyperfocus mode not documentation hyperfocus mode From 92d5e2ffd91bf59a2902b5de53c259cc3d2d6520 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 13 May 2024 23:37:41 -0400 Subject: [PATCH 04/53] add key to mapped slot components --- extension/data/frontends/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx index bbf2f87e0..6528d0e80 100644 --- a/extension/data/frontends/index.tsx +++ b/extension/data/frontends/index.tsx @@ -121,7 +121,13 @@ const createRenderer = (location: K, detail data-location={location} > {/* TODO: Do we want to do anything more sophisticated here? */} - {slotConsumers[location]?.map(Component => )} + {slotConsumers[location]?.map((Component, i) => ( + + ))} , ); From 69e2907bcca89dc831a9b339de2a8a0abf55fd22 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 02:32:15 -0400 Subject: [PATCH 05/53] update log names for consistency --- extension/data/frontends/modmail.ts | 2 +- extension/data/frontends/oldreddit.ts | 2 +- extension/data/frontends/shreddit.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/data/frontends/modmail.ts b/extension/data/frontends/modmail.ts index 33b49f917..9b7d8ec1e 100644 --- a/extension/data/frontends/modmail.ts +++ b/extension/data/frontends/modmail.ts @@ -1,7 +1,7 @@ import TBLog from '../tblog'; import {PlatformObserver} from '.'; -const log = TBLog('observe:modmail'); +const log = TBLog('observer:modmail'); export default (() => { log.warn('Modmail observer not yet implemented'); diff --git a/extension/data/frontends/oldreddit.ts b/extension/data/frontends/oldreddit.ts index f2d11d69a..69f3e10ea 100644 --- a/extension/data/frontends/oldreddit.ts +++ b/extension/data/frontends/oldreddit.ts @@ -1,7 +1,7 @@ import TBLog from '../tblog'; import {PlatformObserver} from '.'; -const log = TBLog('observe:old'); +const log = TBLog('observer:old'); export default (() => { log.warn('Modmail observer not yet implemented'); diff --git a/extension/data/frontends/shreddit.ts b/extension/data/frontends/shreddit.ts index 4381a8d7e..68cd7337a 100644 --- a/extension/data/frontends/shreddit.ts +++ b/extension/data/frontends/shreddit.ts @@ -1,7 +1,7 @@ import TBLog from '../tblog'; import {PlatformObserver} from '.'; -const log = TBLog('observe:shreddit'); +const log = TBLog('observer:shreddit'); export default (() => { log.warn('Modmail observer not yet implemented'); From 0c8db281074fb99ef19c2b506710922e81e4b6b4 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 02:33:11 -0400 Subject: [PATCH 06/53] ensure we use a sufficiently different jsapi consumer name --- extension/data/frontends/newreddit.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/data/frontends/newreddit.ts b/extension/data/frontends/newreddit.ts index eb43b84b2..64ca4d636 100644 --- a/extension/data/frontends/newreddit.ts +++ b/extension/data/frontends/newreddit.ts @@ -5,6 +5,8 @@ import {type PlatformObserver, PlatformSlotDetails} from '.'; const log = TBLog('observer:new'); +const JSAPI_CONSUMER_NAME = 'toolbox-platform-observer'; + interface JSAPISubreddit { id: string; name: string; @@ -143,7 +145,7 @@ export default (createRenderer => { document.addEventListener('reddit', event => { const e = event as JSAPIEvent; // life's too short to worry about this - const target = e.target?.querySelector('[data-name="toolbox"]'); + const target = e.target?.querySelector(`[data-name="${JSAPI_CONSUMER_NAME}"]`); if (!target || target.classList.contains('tb-target-seen')) { return; } @@ -161,7 +163,7 @@ export default (createRenderer => { const meta = document.createElement('meta'); meta.name = 'jsapi.consumer'; // TODO: this can be changed back to just `toolbox` once TBListener is gone - meta.content = 'toolbox-platform-observer'; + meta.content = JSAPI_CONSUMER_NAME; document.head.appendChild(meta); meta.dispatchEvent(new CustomEvent('reddit.ready')); log.info('Connected to jsAPI'); From 147531f869f939fbca636f10648caf0879de7433 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 02:33:30 -0400 Subject: [PATCH 07/53] don't include details we can't get easily for now --- extension/data/frontends/index.tsx | 8 ++++---- extension/data/frontends/newreddit.ts | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx index 6528d0e80..cfdb5fc49 100644 --- a/extension/data/frontends/index.tsx +++ b/extension/data/frontends/index.tsx @@ -47,16 +47,16 @@ export interface PlatformSlotDetails { user: PlatformSlotDetailsUser; submission?: PlatformSlotDetailsSubmission; subreddit: PlatformSlotDetailsSubreddit; - distinguishType: null | 'moderator' | 'employee' | 'alumnus'; - stickied: boolean; + // distinguishType: null | 'moderator' | 'employee' | 'alumnus'; + // stickied: boolean; }; commentAuthor: { user: PlatformSlotDetailsUser; comment: PlatformSlotDetailsComment; submission?: PlatformSlotDetailsSubmission; subreddit: PlatformSlotDetailsSubreddit; - distinguished: boolean; - stickied: boolean; + // distinguished: boolean; + // stickied: boolean; }; modmailAuthor: { user: PlatformSlotDetailsUser; diff --git a/extension/data/frontends/newreddit.ts b/extension/data/frontends/newreddit.ts index 64ca4d636..e7ab48790 100644 --- a/extension/data/frontends/newreddit.ts +++ b/extension/data/frontends/newreddit.ts @@ -116,8 +116,6 @@ function mapEvent (event: JSAPIEvent): SlotRenderArgs | null { submission: { fullname: event.detail.data.post.id, }, - distinguishType: null, // TODO - stickied: false, // TODO }]; } if (event.detail.type === 'commentAuthor') { @@ -133,8 +131,6 @@ function mapEvent (event: JSAPIEvent): SlotRenderArgs | null { fullname: event.detail.data.subreddit.id, name: event.detail.data.subreddit.name, }, - distinguishType: null, // TODO - stickied: false, // TODO }]; } From 3dff63372d2575740f06b56584bfcd7817df387f Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 02:33:52 -0400 Subject: [PATCH 08/53] oldreddit observer based on oldreddit module code --- extension/data/frontends/oldreddit.ts | 109 +++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/extension/data/frontends/oldreddit.ts b/extension/data/frontends/oldreddit.ts index 69f3e10ea..38d302097 100644 --- a/extension/data/frontends/oldreddit.ts +++ b/extension/data/frontends/oldreddit.ts @@ -1,8 +1,113 @@ +import $ from 'jquery'; + +import {getThingInfo} from '../tbcore.js'; import TBLog from '../tblog'; import {PlatformObserver} from '.'; const log = TBLog('observer:old'); -export default (() => { - log.warn('Modmail observer not yet implemented'); +// Class added to items when they are added to the intersection observer, to +// prevent them from being observed multiple times +const THING_OBSERVED_CLASS = 'tb-observer-oldreddit-thing-observed'; + +// Class added to items when they come into the viewport and have their slots +// added, to prevent having slots duplicated in case another intersection +// observer event causes it to be processed again +const THING_PROCESSED_CLASS = 'tb-observer-oldreddit-thing-processed'; + +export default (createRenderer => { + /** + * {@linkcode IntersectionObserver} that handles adding renderers to things + * when they are about to scroll into view. + */ + const viewportObserver = new IntersectionObserver((entries, observer) => { + entries.forEach(async ({target, isIntersecting}) => { + // The observer fires for everything on page load. This makes sure + // that we really only act on those items that are visible. + if (!isIntersecting) { + return; + } + + // Don't continue observing the element once it's become visible. + observer.unobserve(target); + + // If the element's parent is updated, sometimes it gets emitted + // again anyway. Check for stuff we've seen before by checking for + // an added class. + if (target.classList.contains(THING_PROCESSED_CLASS)) { + log.debug('target observed a second time?? so it *does* happen sometimes', target); + return; + } + target.classList.add(THING_PROCESSED_CLASS); + + // Get information about the item so we can fill in context data + const info = await getThingInfo($(target)); + + if (info.kind === 'submission') { + const entryEl = target.querySelector('.entry'); + const authorEl = entryEl?.querySelector('.tagline :is(.author, time + span)'); + + // TODO: We don't have non-author slots yet, but + // entryEl?.appendChild(createRenderer(...)) + + authorEl?.after(createRenderer('submissionAuthor', { + user: (info.author && info.author !== '[deleted]') + ? {deleted: false, name: info.author} + : {deleted: true}, + subreddit: { + name: info.subreddit, + }, + submission: { + fullname: info.id as string, + }, + })); + } + + if (info.kind === 'comment') { + const entryEl = target.querySelector(':scope > .entry'); + const authorEl = entryEl?.querySelector(':scope > .tagline :is(.author, em)'); + + // TODO: We don't have non-author slots yet, but + // entryEl?.appendChild(createRenderer(...)); + + authorEl?.after(createRenderer('commentAuthor', { + user: (info.author && info.author !== '[deleted]') + ? { + deleted: false, + name: info.author, + } + : {deleted: true}, + submission: { + fullname: info.postID, + }, + comment: { + fullname: info.id as string, + }, + subreddit: { + name: info.subreddit, + }, + })); + } + }); + }, {rootMargin: '200px'}); + + // Finds unprocessed items in the DOM and starts waiting for them to get + // close to the viewport edge + function observeNewThings () { + $(`div.content .thing:not(.${THING_OBSERVED_CLASS}) .entry`).closest('.thing').each(function () { + this.classList.add(THING_OBSERVED_CLASS); + viewportObserver.observe(this); + }); + } + + observeNewThings(); + + // TODO: In the future we'd like to remove the TBNewThings event + // entirely and consolidate RES infinite scroll logic in this + // file, since it's only relevant on old Reddit. But not all our + // UI uses the slots/observer API yet, so it doesn't make sense to + // pull it in here yet. + window.addEventListener('TBNewThings', () => { + observeNewThings(); + }); }) satisfies PlatformObserver; From b017242834aa117350ea122cd4890e4d40e36278 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 03:14:06 -0400 Subject: [PATCH 09/53] more context data model revisions --- extension/data/frontends/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx index cfdb5fc49..5c768bb8a 100644 --- a/extension/data/frontends/index.tsx +++ b/extension/data/frontends/index.tsx @@ -61,8 +61,15 @@ export interface PlatformSlotDetails { modmailAuthor: { user: PlatformSlotDetailsUser; subreddit: PlatformSlotDetailsSubreddit; - authorIsModerator: boolean; - repliedAsSubreddit: boolean; + thread: {fullname: string}; + message: {fullname: string}; + // authorIsModerator: boolean; + // repliedAsSubreddit: boolean; + }; + userHovercard: { + user: PlatformSlotDetailsUser; + subreddit: PlatformSlotDetailsSubreddit; + contextFullname?: string; }; } export type PlatformSlotLocation = keyof PlatformSlotDetails; From 557a95570e71066b99206dfd35a9c7242560495a Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 03:15:10 -0400 Subject: [PATCH 10/53] modmail observer pulled even harder from tblistener god this sucks so much --- extension/data/frontends/modmail.ts | 95 ++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/extension/data/frontends/modmail.ts b/extension/data/frontends/modmail.ts index 9b7d8ec1e..91b2a83e2 100644 --- a/extension/data/frontends/modmail.ts +++ b/extension/data/frontends/modmail.ts @@ -1,8 +1,99 @@ +import {getThingInfo} from '../tbcore'; import TBLog from '../tblog'; import {PlatformObserver} from '.'; const log = TBLog('observer:modmail'); -export default (() => { - log.warn('Modmail observer not yet implemented'); +const MESSAGE_SEEN_CLASS = 'tb-observer-modmail-message-seen'; + +const SIDEBAR_SEEN_CLASS = 'tb-observer-modmail-sidebar-seen'; + +export default (createRenderer => { + function newModmailConversationAuthors () { + const $body = $('body'); + const subreddit = $body.find('.ThreadTitle__community').text(); + $body.find(`.Thread__message:not(.${MESSAGE_SEEN_CLASS})`).each(function () { + const $this = $(this); + this.classList.add(MESSAGE_SEEN_CLASS); + + // Get information + const authorHref = $this.find('.Message__header .Message__author').attr('href'); + const idDetails = $this.find('.m-link').attr('href')!.match(/\/mail\/.*?\/(.*?)\/(.*?)$/i)!; + + this.querySelector('.Message__divider')?.after(createRenderer('modmailAuthor', { + user: authorHref === undefined + ? {deleted: true} + : {deleted: false, name: authorHref.replace(/.*\/user\/([^/]+).*/, '$1')}, + subreddit: { + name: subreddit, + }, + thread: { + fullname: idDetails[1], + }, + message: { + fullname: idDetails[2], + }, + })); + }); + } + + /** + * Makes sure to fire a jsAPI `TBuserHovercard` event for new modmail sidebar instances. + * @function + */ + function newModmailSidebar () { + const $body = $('body'); + if ($body.find('.ThreadViewer').length) { + const $modmailSidebar = $body.find( + `:is(.ThreadViewer__infobar, .ThreadViewerHeader__infobar, .InfoBar__idCard):not(.${SIDEBAR_SEEN_CLASS})`, + ); + const jsApiPlaceHolder = ` +
+
Toolbox functions:
+ +
+ `; + $modmailSidebar.each(function () { + getThingInfo(this, true).then(info => { + this.classList.add(SIDEBAR_SEEN_CLASS); + + const $jsApiThingPlaceholder = $(jsApiPlaceHolder).appendTo(this); + const jsApiThingPlaceholder = $jsApiThingPlaceholder[0]; + + jsApiThingPlaceholder.appendChild(createRenderer('userHovercard', { + user: (info.user && info.user !== '[deleted]') + ? {deleted: false, name: info.user} + : {deleted: true}, + subreddit: { + name: info.subreddit, + }, + })); + }); + }); + } + } + + const $body = $('body'); + + $body.on('click', '.icon-user', () => { + setTimeout(() => { + newModmailSidebar(); + }, 500); + }); + + $body.on('click', '.Thread__grouped', () => { + setTimeout(() => { + newModmailConversationAuthors(); + }, 500); + }); + + window.addEventListener('TBNewPage', event => { + // TODO: augh + if ((event as any).detail.pageType === 'modmailConversation') { + setTimeout(() => { + newModmailSidebar(); + newModmailConversationAuthors(); + }, 500); + } + }); }) satisfies PlatformObserver; From e73d528f8bed1f2e81cc541efc42d3ee2f3e9e18 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 03:15:31 -0400 Subject: [PATCH 11/53] fix unrelated bug with admin usernames in modmail sidebars --- extension/data/tbcore.js | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/data/tbcore.js b/extension/data/tbcore.js index 7feeda681..263a671d8 100644 --- a/extension/data/tbcore.js +++ b/extension/data/tbcore.js @@ -1010,6 +1010,7 @@ export async function getThingInfo (sender, modCheck) { ham = false; user = $threadBase.find('.Message__author').first().text() || $body.find('.InfoBar__username').first().text() + || $body.find('.ModIdCard__UserNameLink').first().text() || $body.find('.ModIdCard__UserNameContainer').first().text(); } else { const $entry = $($sender.closest('.entry')[0] || $sender.find('.entry')[0] || $sender); From 67b3ca68316580d35372fa3364196c7b960d741f Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 03:15:41 -0400 Subject: [PATCH 12/53] put modnotes in the user hovercard location too --- extension/data/modules/modnotes.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extension/data/modules/modnotes.jsx b/extension/data/modules/modnotes.jsx index ae2946c08..6e4527b57 100644 --- a/extension/data/modules/modnotes.jsx +++ b/extension/data/modules/modnotes.jsx @@ -442,7 +442,7 @@ function ModNotesPopup ({ className='tb-action-button tb-modnote-label-select' defaultValue={defaultNoteLabelValueToLabelType[defaultNoteLabel]} > - + {Object.entries(labelNames).reverse().map(([value, name]) => ( ))} @@ -585,10 +585,11 @@ export default new Module({ 'commentAuthor', 'submissionAuthor', 'modmailAuthor', + 'userHovercard', ], ({details}) => { const subreddit = details.subreddit.name; const user = !details.user.deleted && details.user.name; - const contextID = details.comment?.id || details.submission?.id || null; + const contextID = details.comment?.fullname || details.submission?.fullname || null; const isMod = useFetched(isModSub(details.subreddit.name)); From e80a144ba2823cfd0f3f3cc995a6f436393d99b0 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 03:16:49 -0400 Subject: [PATCH 13/53] guess we just dont need a logger there --- extension/data/frontends/modmail.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/extension/data/frontends/modmail.ts b/extension/data/frontends/modmail.ts index 91b2a83e2..3ad5311aa 100644 --- a/extension/data/frontends/modmail.ts +++ b/extension/data/frontends/modmail.ts @@ -2,8 +2,6 @@ import {getThingInfo} from '../tbcore'; import TBLog from '../tblog'; import {PlatformObserver} from '.'; -const log = TBLog('observer:modmail'); - const MESSAGE_SEEN_CLASS = 'tb-observer-modmail-message-seen'; const SIDEBAR_SEEN_CLASS = 'tb-observer-modmail-sidebar-seen'; From b233f35d251f308b840e7949713fb6362eed4111 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 14 May 2024 03:20:56 -0400 Subject: [PATCH 14/53] i am dumb --- extension/data/frontends/modmail.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/extension/data/frontends/modmail.ts b/extension/data/frontends/modmail.ts index 3ad5311aa..47f075551 100644 --- a/extension/data/frontends/modmail.ts +++ b/extension/data/frontends/modmail.ts @@ -1,5 +1,4 @@ import {getThingInfo} from '../tbcore'; -import TBLog from '../tblog'; import {PlatformObserver} from '.'; const MESSAGE_SEEN_CLASS = 'tb-observer-modmail-message-seen'; From d4735adf036d4a23ea425db0b3609a2d046c2044 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 17:34:14 -0400 Subject: [PATCH 15/53] convert usernotes to slots --- extension/data/modules/usernotes.js | 66 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/extension/data/modules/usernotes.js b/extension/data/modules/usernotes.js index 6a6c9f866..10c76961d 100644 --- a/extension/data/modules/usernotes.js +++ b/extension/data/modules/usernotes.js @@ -1,12 +1,16 @@ import $ from 'jquery'; +import {createElement} from 'react'; +import {renderInSlots} from '../frontends/index.tsx'; +import {useFetched} from '../hooks.ts'; import * as TBApi from '../tbapi.ts'; import * as TBCore from '../tbcore.js'; import * as TBHelpers from '../tbhelpers.js'; -import TBListener from '../tblistener.js'; import {Module} from '../tbmodule.jsx'; import * as TBStorage from '../tbstorage.js'; import * as TBui from '../tbui.js'; +import {currentPlatform, RedditPlatform} from '../util/platform.ts'; +import {JQueryRenderer} from '../util/ui_interop.tsx'; // FIXME: It no longer makes sense to bake logger functions into modules // themselves, since functions the module defines may not have the module @@ -120,45 +124,39 @@ function startUsernotes ({maxChars, showDate, onlyshowInhover}) { function addTBListener () { // event based handling of author elements. - TBListener.on('author', async e => { - const $target = $(e.target); - if ($target.closest('.tb-thing').length || !onlyshowInhover || TBCore.isOldReddit || TBCore.isNewModmail) { - const subreddit = e.detail.data.subreddit.name; - const author = e.detail.data.author; - if (author === '[deleted]') { - return; - } - - $target.addClass('ut-thing'); - $target.attr('data-subreddit', subreddit); - $target.attr('data-author', author); - - const isMod = await TBCore.isModSub(subreddit); - if (isMod) { - attachNoteTag($target, subreddit, author); - foundSubreddit(subreddit); - queueProcessSub(subreddit, $target); - } + renderInSlots([ + 'userHovercard', + 'submissionAuthor', + 'commentAuthor', + 'modmailAuthor', + ], ({location, details}) => { + const subreddit = details.subreddit.name; + const author = details.user.name; + + const isMod = useFetched(TBCore.isModSub(subreddit)); + + if (onlyshowInhover && ![RedditPlatform.OLD, RedditPlatform.MODMAIL].includes(currentPlatform)) { + return <>; + } + if (details.user.deleted) { + return <>; + } + if (!isMod) { + return <>; } - }); - // event based handling of author elements. - TBListener.on('userHovercard', async e => { - const $target = $(e.target); - const subreddit = e.detail.data.subreddit.name; - const author = e.detail.data.user.username; + const $target = $('
'); $target.addClass('ut-thing'); $target.attr('data-subreddit', subreddit); $target.attr('data-author', author); - const isMod = await TBCore.isModSub(subreddit); - if (isMod) { - attachNoteTag($target, subreddit, author, { - customText: 'Usernotes', - }); - foundSubreddit(subreddit); - queueProcessSub(subreddit, $target); - } + attachNoteTag($target, subreddit, author, { + customText: location === 'userHovercard' ? 'Usernotes' : undefined, + }); + foundSubreddit(subreddit); + queueProcessSub(subreddit, $target); + + return createElement(JQueryRenderer, {content: $target}); }); } From ac59a9b77fc793bcab546a0df7f33a804c050fb3 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 18:47:58 -0400 Subject: [PATCH 16/53] Use display:contents for jQ renderers --- extension/data/util/ui_interop.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/data/util/ui_interop.tsx b/extension/data/util/ui_interop.tsx index bd1362e7a..b884f9245 100644 --- a/extension/data/util/ui_interop.tsx +++ b/extension/data/util/ui_interop.tsx @@ -38,5 +38,5 @@ export function JQueryRenderer ({content}: {content: JQuery}) { }; } }, [content]); - return
; + return
; } From 8da95e7de84a8c819ffefbe92ba7210a7b7a7f03 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 18:48:33 -0400 Subject: [PATCH 17/53] don't initialize observers until after all registrations --- extension/data/frontends/index.tsx | 16 +++++++++++----- extension/data/init.ts | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx index 5c768bb8a..e8d862c80 100644 --- a/extension/data/frontends/index.tsx +++ b/extension/data/frontends/index.tsx @@ -139,15 +139,21 @@ const createRenderer = (location: K, detail ); // Initialize the appropriate observer for the platform we've loaded into -// FIXME: this should really not be done here. export a function that does this -// and have it get called from init.ts only if load conditions pass let observers = { [RedditPlatform.OLD]: oldRedditObserver, [RedditPlatform.NEW]: newRedditObserver, [RedditPlatform.SHREDDIT]: shredditObserver, [RedditPlatform.MODMAIL]: modmailObserver, }; -if (currentPlatform != null) { - let observer = observers[currentPlatform]; - observer(createRenderer); + +/** + * Start the platform observer, which will cause slots to be identified and + * populated. To be called as part of the init process after all slot consumers + * have been registered via {@linkcode renderInSlots}. + */ +export function initializeObserver () { + if (currentPlatform == null) { + return; + } + observers[currentPlatform](createRenderer); } diff --git a/extension/data/init.ts b/extension/data/init.ts index 27fb61280..412a55261 100644 --- a/extension/data/init.ts +++ b/extension/data/init.ts @@ -34,6 +34,7 @@ import TBModule from './tbmodule.jsx'; import * as TBStorage from './tbstorage.js'; import AppRoot from './AppRoot'; +import {initializeObserver} from './frontends'; import {documentInteractive} from './util/dom'; import {isUserLoggedInQuick} from './util/platform'; import {reactRenderer} from './util/ui_interop'; @@ -379,5 +380,6 @@ async function doSettingsUpdates () { // Once all modules are initialized and have had a chance to register event // listeners, start emitting jsAPI events and page URL change events TBListener.start(); + initializeObserver(); TBCore.watchForURLChanges(); })(); From fff814c65a3c26d870de65b4707b147eec997b4c Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 18:57:58 -0400 Subject: [PATCH 18/53] use contextFullname when available for modnotes --- extension/data/modules/modnotes.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/data/modules/modnotes.jsx b/extension/data/modules/modnotes.jsx index 6e4527b57..58103e339 100644 --- a/extension/data/modules/modnotes.jsx +++ b/extension/data/modules/modnotes.jsx @@ -589,7 +589,7 @@ export default new Module({ ], ({details}) => { const subreddit = details.subreddit.name; const user = !details.user.deleted && details.user.name; - const contextID = details.comment?.fullname || details.submission?.fullname || null; + const contextID = details.contextFullname || details.comment?.fullname || details.submission?.fullname || null; const isMod = useFetched(isModSub(details.subreddit.name)); From 900a6ac228f25722e32efa53c16a8c960dd62bc8 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 18:58:11 -0400 Subject: [PATCH 19/53] return null for no render instead of empty fragment --- extension/data/modules/modnotes.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/data/modules/modnotes.jsx b/extension/data/modules/modnotes.jsx index 58103e339..f9d153f5d 100644 --- a/extension/data/modules/modnotes.jsx +++ b/extension/data/modules/modnotes.jsx @@ -607,7 +607,7 @@ export default new Module({ // notes in a sub you're not a mod of // TODO: What specific permissions are required to fetch notes? if (!subreddit || !user || !isMod) { - return <>; + return null; } /** @type {{top: number; left: number} | undefined} */ From fc2c7ecee8f2d7361fff479ad2bf6e45f942e94b Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 18:58:47 -0400 Subject: [PATCH 20/53] Handle onlyshowInhover behavior at the listener level --- extension/data/frontends/newreddit.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/extension/data/frontends/newreddit.ts b/extension/data/frontends/newreddit.ts index e7ab48790..80c36f6e3 100644 --- a/extension/data/frontends/newreddit.ts +++ b/extension/data/frontends/newreddit.ts @@ -3,6 +3,8 @@ import TBLog from '../tblog'; import {type PlatformObserver, PlatformSlotDetails} from '.'; +import generalSettings from '../modules/general'; + const log = TBLog('observer:new'); const JSAPI_CONSUMER_NAME = 'toolbox-platform-observer'; @@ -102,8 +104,11 @@ interface JSAPIEvent extends CustomEvent { type SlotRenderArgs = [K, PlatformSlotDetails[K]]; /** Maps data received from jsAPI events into standardized slot data. */ -function mapEvent (event: JSAPIEvent): SlotRenderArgs | null { +async function mapEvent (event: JSAPIEvent): Promise { if (event.detail.type === 'postAuthor') { + if (await generalSettings.get('onlyshowInhover')) { + return null; + } return ['submissionAuthor', { user: event.detail.data.author === '[deleted]' ? {deleted: true} : { deleted: false, @@ -119,6 +124,9 @@ function mapEvent (event: JSAPIEvent): SlotRenderArgs | null { }]; } if (event.detail.type === 'commentAuthor') { + if (await generalSettings.get('onlyshowInhover')) { + return null; + } return ['commentAuthor', { user: event.detail.data.author === '[deleted]' ? {deleted: true} : { deleted: false, @@ -133,12 +141,19 @@ function mapEvent (event: JSAPIEvent): SlotRenderArgs | null { }, }]; } + if (event.detail.type === 'userHovercard') { + return ['userHovercard', { + user: {deleted: false, name: event.detail.data.user.username}, + subreddit: {name: event.detail.data.subreddit.name}, + contextFullname: event.detail.data.contextId, + }]; + } return null; } export default (createRenderer => { - document.addEventListener('reddit', event => { + document.addEventListener('reddit', async event => { const e = event as JSAPIEvent; // life's too short to worry about this const target = e.target?.querySelector(`[data-name="${JSAPI_CONSUMER_NAME}"]`); @@ -149,7 +164,7 @@ export default (createRenderer => { target.classList.add('tb-target-seen'); log.debug('saw new jsAPI event:', target, e.detail); - let renderOptions = mapEvent(e); + let renderOptions = await mapEvent(e); if (!renderOptions) { return; } From 7ebf831731a747dce31e02b4bd25d615bee15db9 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 18:59:10 -0400 Subject: [PATCH 21/53] convert usernotes module --- extension/data/modules/usernotes.js | 33 ++++++++++------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/extension/data/modules/usernotes.js b/extension/data/modules/usernotes.js index 10c76961d..2d226ada3 100644 --- a/extension/data/modules/usernotes.js +++ b/extension/data/modules/usernotes.js @@ -135,20 +135,21 @@ function startUsernotes ({maxChars, showDate, onlyshowInhover}) { const isMod = useFetched(TBCore.isModSub(subreddit)); - if (onlyshowInhover && ![RedditPlatform.OLD, RedditPlatform.MODMAIL].includes(currentPlatform)) { - return <>; - } - if (details.user.deleted) { - return <>; - } - if (!isMod) { - return <>; + if (details.user.deleted || !isMod) { + return null; } - const $target = $('
'); + // spoof the structure the rest of this code is expecting + // TODO: get rid of all this crap when rewriting to use React + const $target = $(''); $target.addClass('ut-thing'); + $target.css('display', 'contents'); $target.attr('data-subreddit', subreddit); $target.attr('data-author', author); + $target.attr( + 'data-context-fullname', + details.contextFullname || details.comment?.fullname || details.submission?.fullname, + ); attachNoteTag($target, subreddit, author, { customText: location === 'userHovercard' ? 'Usernotes' : undefined, @@ -514,19 +515,7 @@ function startUsernotes ({maxChars, showDate, onlyshowInhover}) { link = thingInfo.permalink_newmodmail; createUserPopup(subreddit, user, link, disableLink, e); } else { - let thingID; - let thingDetails; - - if ($thing.data('tb-type') === 'TBcommentAuthor' || $thing.data('tb-type') === 'commentAuthor') { - thingDetails = $thing.data('tb-details'); - thingID = thingDetails.data.comment.id; - } else if ($thing.data('tb-type') === 'userHovercard') { - thingDetails = $thing.data('tb-details'); - thingID = thingDetails.data.contextId; - } else { - thingDetails = $thing.data('tb-details'); - thingID = thingDetails.data.post.id; - } + const thingID = $thing.attr('data-context-fullname'); if (!thingID) { // we don't have the ID on /about/banned, so no thing data for us From 22c4ccf775d82cd27a52c8761706ee88d1887bc4 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 16 May 2024 19:10:46 -0400 Subject: [PATCH 22/53] i knew it was gonna be a circular dependency issue --- extension/data/frontends/newreddit.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/data/frontends/newreddit.ts b/extension/data/frontends/newreddit.ts index 80c36f6e3..1f54b6881 100644 --- a/extension/data/frontends/newreddit.ts +++ b/extension/data/frontends/newreddit.ts @@ -3,7 +3,7 @@ import TBLog from '../tblog'; import {type PlatformObserver, PlatformSlotDetails} from '.'; -import generalSettings from '../modules/general'; +import {getSettingAsync} from '../tbstorage'; const log = TBLog('observer:new'); @@ -106,7 +106,7 @@ type SlotRenderArgs { if (event.detail.type === 'postAuthor') { - if (await generalSettings.get('onlyshowInhover')) { + if (await getSettingAsync('GenSettings', 'onlyshowInhover', true)) { return null; } return ['submissionAuthor', { @@ -124,7 +124,7 @@ async function mapEvent (event: JSAPIEvent): Promise { }]; } if (event.detail.type === 'commentAuthor') { - if (await generalSettings.get('onlyshowInhover')) { + if (await getSettingAsync('GenSettings', 'onlyshowInhover', true)) { return null; } return ['commentAuthor', { From d60d042b68b1c44643b9d6cb8826ac8e829976cc Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 17 May 2024 23:07:28 -0400 Subject: [PATCH 23/53] have toolbox-generated things manage their own slots --- extension/data/frontends/index.tsx | 5 ++++- extension/data/tbui.js | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/extension/data/frontends/index.tsx b/extension/data/frontends/index.tsx index e8d862c80..d23a12ec4 100644 --- a/extension/data/frontends/index.tsx +++ b/extension/data/frontends/index.tsx @@ -120,7 +120,10 @@ export type PlatformObserver = ( // the actual `createRenderer` function observers get - returns a new react root // which will contain all the contents different modules have registered for the // given slot location -const createRenderer = (location: K, details: PlatformSlotDetails[K]) => +// NOTE: Exported because tbui builders need to manually emit their own slots. +// Should we just import this from the platform-specific bits instead of +// passing this function in to them? +export const createRenderer = (location: K, details: PlatformSlotDetails[K]) => reactRenderer(
Date: Mon, 5 Aug 2024 11:07:32 -0400 Subject: [PATCH 24/53] clean up import list since this is my fault --- extension/data/modules/modnotes.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extension/data/modules/modnotes.jsx b/extension/data/modules/modnotes.jsx index f9d153f5d..4a601b7c8 100644 --- a/extension/data/modules/modnotes.jsx +++ b/extension/data/modules/modnotes.jsx @@ -1,4 +1,6 @@ import {map, page, pipeAsync} from 'iter-ops'; +import {useEffect, useRef, useState} from 'react'; +import {createPortal} from 'react-dom'; import {useFetched, useSetting} from '../hooks.ts'; import * as TBApi from '../tbapi.ts'; @@ -9,9 +11,6 @@ import {Module} from '../tbmodule.jsx'; import {setSettingAsync} from '../tbstorage.js'; import {drawPosition, textFeedback, TextFeedbackKind} from '../tbui.js'; -import {useEffect, useRef, useState} from 'react'; -import {createPortal} from 'react-dom'; - import {Icon} from '../components/controls/Icon.tsx'; import {RelativeTime} from '../components/controls/RelativeTime.tsx'; import {ProgressivePager} from '../components/ProgressivePager.tsx'; From aadb07de42faeb315f07f7253169159bdc796505 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 5 Aug 2024 11:46:42 -0400 Subject: [PATCH 25/53] convert mod button to slots --- extension/data/modules/modbutton.js | 72 +++++++++++++---------------- 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/extension/data/modules/modbutton.js b/extension/data/modules/modbutton.js index afcb28c89..d4e947338 100644 --- a/extension/data/modules/modbutton.js +++ b/extension/data/modules/modbutton.js @@ -1,5 +1,7 @@ import $ from 'jquery'; +import {createElement} from 'react'; +import {renderInSlots} from '../frontends/index.js'; import * as TBApi from '../tbapi.ts'; import * as TBCore from '../tbcore.js'; import * as TBHelpers from '../tbhelpers.js'; @@ -7,6 +9,7 @@ import TBListener from '../tblistener.js'; import {Module} from '../tbmodule.jsx'; import * as TBStorage from '../tbstorage.js'; import * as TBui from '../tbui.js'; +import {JQueryRenderer} from '../util/ui_interop.js'; const MAX_BAN_REASON_LENGTH = 300; const MAX_BAN_MESSAGE_LENGTH = 5000; @@ -60,7 +63,6 @@ const self = new Module({ export default self; const $body = $('body'); -const titleText = 'Perform various mod actions on this user'; self.runRedesign = async function () { // Not a mod, don't bother. @@ -68,49 +70,37 @@ self.runRedesign = async function () { if (mySubs.length < 1) { return; } - const onlyshowInhover = await self.get('onlyshowInhover'); - TBListener.on('author', e => { - const $target = $(e.target); - - // As the modbutton is already accessible in the sidebar and not needed for mods we don't show it in modmail threads. - if (e.detail.type === 'TBmodmailCommentAuthor') { - return; - } - if ($target.closest('.tb-thing').length || !onlyshowInhover || TBCore.isOldReddit || TBCore.isNewModmail) { - const subreddit = e.detail.data.subreddit.name; - const author = e.detail.data.author; - - if (author === '[deleted]') { - return; - } - - let parentID; - if (e.detail.data.comment) { - parentID = e.detail.data.comment.id; - } else if (e.detail.data.post) { - parentID = e.detail.data.post.id; - } else { - parentID = 'unknown'; - } - requestAnimationFrame(() => { - $target.append( - `M`, - ); - }); + renderInSlots([ + 'submissionAuthor', + 'commentAuthor', + 'userHovercard', + ], ({details, location}) => { + const contextFullname = details.contextFullname || details.comment?.fullname || details.submission?.fullname + || 'unknown'; + const subreddit = details.subreddit.name; + const user = !details.user.deleted && details.user.name; + + // End of state/hooks - render + if (details.user.deleted) { + return null; } - }); - // event based handling of author elements. - TBListener.on('userHovercard', e => { - const $target = $(e.target); - const subreddit = e.detail.data.subreddit.name; - const author = e.detail.data.user.username; - const parentID = e.detail.data.contextId; - - $target.append( - `Mod Button`, - ); + // TODO: convert the whole popup thing to be React-oriented + return createElement(JQueryRenderer, { + content: $(` + + ${location === 'userHovercard' ? 'Mod Button' : 'M'} + + `), + }); }); }; From 4bf25718a50c1b4eeb90a3d4970baf8fd7e22bda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 16:53:12 -0400 Subject: [PATCH 26/53] Bump react and @types/react (#936) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 23 ++++++++--------------- package.json | 4 ++-- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index abe7e2032..625a430d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "iter-ops": "^3.1.1", "jquery": "^3.7.1", "pako": "^0.2.6", - "react": "^18.2.0", + "react": "^18.3.0", "react-dom": "^18.2.0", "react-redux": "^9.1.0", "snuownd": "github:gamefreak/snuownd#533e8dcb67fe8e4ddc83fb8317ed0d10c25b6fcb", @@ -30,7 +30,7 @@ "@tsconfig/recommended": "^1.0.3", "@types/jquery": "^3.5.29", "@types/jquery.timeago": "^1.0.33", - "@types/react": "^18.2.61", + "@types/react": "^18.3.0", "@types/react-dom": "^18.2.19", "@types/webextension-polyfill": "^0.10.7", "cross-env": "^7.0.3", @@ -925,13 +925,12 @@ "devOptional": true }, "node_modules/@types/react": { - "version": "18.2.61", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.61.tgz", - "integrity": "sha512-NURTN0qNnJa7O/k4XUkEW2yfygA+NxS0V5h1+kp9jPwhzZy95q3ADoGMP0+JypMhrZBTTgjKAUlTctde1zzeQA==", + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.0.tgz", + "integrity": "sha512-DiUcKjzE6soLyln8NNZmyhcQjVv+WsUIFSqetMN0p8927OztKT4VTfFTqsbAi5oAGIcgOmOajlfBqyptDDjZRw==", "devOptional": true, "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", "csstype": "^3.0.2" } }, @@ -950,12 +949,6 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, - "node_modules/@types/scheduler": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz", - "integrity": "sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==", - "devOptional": true - }, "node_modules/@types/sizzle": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", @@ -4367,9 +4360,9 @@ } }, "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.0.tgz", + "integrity": "sha512-RPutkJftSAldDibyrjuku7q11d3oy6wKOyPe5K1HA/HwwrXcEqBdHsLypkC2FFYjP7bPUa6gbzSBhw4sY2JcDg==", "dependencies": { "loose-envify": "^1.1.0" }, diff --git a/package.json b/package.json index fbcadcb8b..bc4acb668 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "iter-ops": "^3.1.1", "jquery": "^3.7.1", "pako": "^0.2.6", - "react": "^18.2.0", + "react": "^18.3.0", "react-dom": "^18.2.0", "react-redux": "^9.1.0", "snuownd": "github:gamefreak/snuownd#533e8dcb67fe8e4ddc83fb8317ed0d10c25b6fcb", @@ -43,7 +43,7 @@ "@tsconfig/recommended": "^1.0.3", "@types/jquery": "^3.5.29", "@types/jquery.timeago": "^1.0.33", - "@types/react": "^18.2.61", + "@types/react": "^18.3.0", "@types/react-dom": "^18.2.19", "@types/webextension-polyfill": "^0.10.7", "cross-env": "^7.0.3", From 37c1d21bb9e23d7bee9ae4c40084c613fcea6bba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 16:54:08 -0400 Subject: [PATCH 27/53] Bump framer-motion from 11.0.3 to 11.2.2 (#944) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 19 +++++++++++-------- package.json | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 625a430d3..39df99581 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@reduxjs/toolkit": "^2.2.1", "codemirror": "^5.65.16", "dompurify": "^3.1.0", - "framer-motion": "^11.0.3", + "framer-motion": "^11.2.2", "iter-ops": "^3.1.1", "jquery": "^3.7.1", "pako": "^0.2.6", @@ -342,6 +342,7 @@ "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", "integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==", "optional": true, + "peer": true, "dependencies": { "@emotion/memoize": "0.7.4" } @@ -350,7 +351,8 @@ "version": "0.7.4", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz", "integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==", - "optional": true + "optional": true, + "peer": true }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", @@ -2512,20 +2514,21 @@ } }, "node_modules/framer-motion": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.0.3.tgz", - "integrity": "sha512-6x2poQpIWBdbZwLd73w6cKZ1I9IEPIU94C6/Swp1Zt3LJ+sB5bPe1E2wC6EH5hSISXNkMJ4afH7AdwS7MrtkWw==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.2.2.tgz", + "integrity": "sha512-Jq65YXsRUUDPJ1VQ30pblGeE5g+a/oOKGiP3zlZT9whL652guO6KJjFhNXtcmatoVkyyNjZ2NDVPUlydpCprzA==", "dependencies": { "tslib": "^2.4.0" }, - "optionalDependencies": { - "@emotion/is-prop-valid": "^0.8.2" - }, "peerDependencies": { + "@emotion/is-prop-valid": "*", "react": "^18.0.0", "react-dom": "^18.0.0" }, "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, "react": { "optional": true }, diff --git a/package.json b/package.json index bc4acb668..854343c9c 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@reduxjs/toolkit": "^2.2.1", "codemirror": "^5.65.16", "dompurify": "^3.1.0", - "framer-motion": "^11.0.3", + "framer-motion": "^11.2.2", "iter-ops": "^3.1.1", "jquery": "^3.7.1", "pako": "^0.2.6", From f94b21dcb265f5140ad3aeb1a685a4875e408877 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 16:54:50 -0400 Subject: [PATCH 28/53] Bump webextension-polyfill from 0.10.0 to 0.12.0 (#942) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39df99581..1bcf14f24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "snuownd": "github:gamefreak/snuownd#533e8dcb67fe8e4ddc83fb8317ed0d10c25b6fcb", "timeago": "^1.6.7", "tinycolor2": "^1.6.0", - "webextension-polyfill": "^0.10.0" + "webextension-polyfill": "^0.12.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", @@ -5414,9 +5414,9 @@ } }, "node_modules/webextension-polyfill": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", - "integrity": "sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==" + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz", + "integrity": "sha512-97TBmpoWJEE+3nFBQ4VocyCdLKfw54rFaJ6EVQYLBCXqCIpLSZkwGgASpv4oPt9gdKCJ80RJlcmNzNn008Ag6Q==" }, "node_modules/which": { "version": "2.0.2", diff --git a/package.json b/package.json index 854343c9c..7d085c946 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "snuownd": "github:gamefreak/snuownd#533e8dcb67fe8e4ddc83fb8317ed0d10c25b6fcb", "timeago": "^1.6.7", "tinycolor2": "^1.6.0", - "webextension-polyfill": "^0.10.0" + "webextension-polyfill": "^0.12.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", From 5fc0ad18c0ce84cc0f06be596ac52ff87cd91b6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 16:55:38 -0400 Subject: [PATCH 29/53] Bump react-dom and @types/react-dom (#945) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 32 ++++++++++++++++---------------- package.json | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1bcf14f24..ecf7310d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "jquery": "^3.7.1", "pako": "^0.2.6", "react": "^18.3.0", - "react-dom": "^18.2.0", + "react-dom": "^18.3.1", "react-redux": "^9.1.0", "snuownd": "github:gamefreak/snuownd#533e8dcb67fe8e4ddc83fb8317ed0d10c25b6fcb", "timeago": "^1.6.7", @@ -31,7 +31,7 @@ "@types/jquery": "^3.5.29", "@types/jquery.timeago": "^1.0.33", "@types/react": "^18.3.0", - "@types/react-dom": "^18.2.19", + "@types/react-dom": "^18.3.0", "@types/webextension-polyfill": "^0.10.7", "cross-env": "^7.0.3", "del-cli": "^5.1.0", @@ -937,9 +937,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.19", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", - "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", "dev": true, "dependencies": { "@types/react": "*" @@ -4363,9 +4363,9 @@ } }, "node_modules/react": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.0.tgz", - "integrity": "sha512-RPutkJftSAldDibyrjuku7q11d3oy6wKOyPe5K1HA/HwwrXcEqBdHsLypkC2FFYjP7bPUa6gbzSBhw4sY2JcDg==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dependencies": { "loose-envify": "^1.1.0" }, @@ -4374,15 +4374,15 @@ } }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-is": { @@ -4855,9 +4855,9 @@ "dev": true }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } diff --git a/package.json b/package.json index 7d085c946..41967ee26 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "jquery": "^3.7.1", "pako": "^0.2.6", "react": "^18.3.0", - "react-dom": "^18.2.0", + "react-dom": "^18.3.1", "react-redux": "^9.1.0", "snuownd": "github:gamefreak/snuownd#533e8dcb67fe8e4ddc83fb8317ed0d10c25b6fcb", "timeago": "^1.6.7", @@ -44,7 +44,7 @@ "@types/jquery": "^3.5.29", "@types/jquery.timeago": "^1.0.33", "@types/react": "^18.3.0", - "@types/react-dom": "^18.2.19", + "@types/react-dom": "^18.3.0", "@types/webextension-polyfill": "^0.10.7", "cross-env": "^7.0.3", "del-cli": "^5.1.0", From 6ba28501333964ab1cf4800b1b3cd25394e9b7dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:21:28 -0400 Subject: [PATCH 30/53] Bump dprint from 0.45.0 to 0.46.2 (#950) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 64 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index ecf7310d0..35076666e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "cross-env": "^7.0.3", "del-cli": "^5.1.0", "docdash": "^2.0.2", - "dprint": "^0.45.0", + "dprint": "^0.46.2", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", @@ -247,9 +247,9 @@ } }, "node_modules/@dprint/darwin-arm64": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.45.0.tgz", - "integrity": "sha512-pkSSmixIKXr5t32bhXIUbpIBm8F8uhsJcUUvfkFNsRbQvNwRp71ribZpE8dKl0ZFOlAFeWD6WLE8smp/QtiGUA==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.46.2.tgz", + "integrity": "sha512-IA/VIWwmIJ4a9rLB0paU0ryXFHRV+NHyWykDa4F+3WgbyXVlv1PVncW5wgfZJ38wQM8FDfPUO2Ar8+Nkx8Fkfg==", "cpu": [ "arm64" ], @@ -260,9 +260,9 @@ ] }, "node_modules/@dprint/darwin-x64": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.45.0.tgz", - "integrity": "sha512-PHcXSrRO53KH9N+YPbPtr40NnDo2t7hO7KLMfl2ktRNLjrmKg6F8XDDsr2C7Z11k3jyEEU2Jq8hhpaKHwNapmQ==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.46.2.tgz", + "integrity": "sha512-YMY40MsN1CL/8fGPcZaA/3KeE09GHt7y4ZRJGCw8Cx7AjZ3P+SlNxL6X9v72eXUfotzudcZc5yC72tdUFaN7oA==", "cpu": [ "x64" ], @@ -273,9 +273,9 @@ ] }, "node_modules/@dprint/linux-arm64-glibc": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.45.0.tgz", - "integrity": "sha512-NgIpvZHpiQaY4DxSygxknxBtvKE2KLK9dEbUNKNE098yTHhGq7ouPsoM7RtsO34RHJ3tEZLLJEuBHn20XP8LMg==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.46.2.tgz", + "integrity": "sha512-brllu3G7nPV5GQTHnDF54ihGwgWHxRr03EQI0Mbbif94P/jl+Dqf9I6qWBSDVt/zQTThY1aYIZt+mpblD4oXZQ==", "cpu": [ "arm64" ], @@ -286,9 +286,9 @@ ] }, "node_modules/@dprint/linux-arm64-musl": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.45.0.tgz", - "integrity": "sha512-Y8p+FC0RNyKCGQjy99Uh1LSPrlQtUTvo4brdvU1THF3pyWu6Bg1p6NiP5a6SjE/6t9CMKZJz39zPreQtnDkSDA==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.46.2.tgz", + "integrity": "sha512-+9pF6qmSMobvtlTk/PnyqYE66nlwyrg7TeJb+RhqAT3y40v8TT4XafdK5p5GOrC1qf1QV4PCLAuOrHAKaYLNqg==", "cpu": [ "arm64" ], @@ -299,9 +299,9 @@ ] }, "node_modules/@dprint/linux-x64-glibc": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.45.0.tgz", - "integrity": "sha512-u03NCZIpJhE5gIl9Q7jNL4sOPBFd/8BLVBiuLoLtbiTZQ+NNudHKgGNATJBU67q1MKpqKnt8/gQm139cJkHhrw==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.46.2.tgz", + "integrity": "sha512-iq0WfIyLrxaE0PVXw89FKwC2VIbo3Hb6PscEVtzWDOpm/bmURXs5JIjRFpAaGfwCZcwzds70bb7utT5ItgZtlA==", "cpu": [ "x64" ], @@ -312,9 +312,9 @@ ] }, "node_modules/@dprint/linux-x64-musl": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.45.0.tgz", - "integrity": "sha512-DQN8LPtxismkeU1X+sQywa80kWwCBcpQh9fXoJcvTEHrgzHBqbG2SEsUZpM12oKEua1KE/iBh+vgZ+4I3TdI2A==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.46.2.tgz", + "integrity": "sha512-Ins2SD0v5Q61b6WIcxnsoHT84E+kyiUjjespxcWzqLrXdPgy8ATLMfcx1vHS4ALD687+PkwCgPF8N2jK66Md6A==", "cpu": [ "x64" ], @@ -325,9 +325,9 @@ ] }, "node_modules/@dprint/win32-x64": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.45.0.tgz", - "integrity": "sha512-aZHIWG2jIlEp4BER1QG6YYqPd6TxT9S77AeUkWJixNiMEo+33mPRVCBcugRWI/WJWveX8yWFVXkToORtnSFeEA==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.46.2.tgz", + "integrity": "sha512-4msLVoyMppU5yPlxnCU0ibk6ahSQs1vcc7ToJkOi3LiCqu/KU+hYk2+bwqiZaQ1usi24iA9AIB+aBVA6X3VDXg==", "cpu": [ "x64" ], @@ -1840,22 +1840,22 @@ "integrity": "sha512-yoU4rhgPKCo+p5UrWWWNKiIq+ToGqmVVhk0PmMYBK4kRsR3/qhemNFL8f6CFmBd4gMwm3F4T7HBoydP5uY07fA==" }, "node_modules/dprint": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.45.0.tgz", - "integrity": "sha512-3444h7V47XoA16qgIWjw3CV/Eo/rQbT/XTGlbJ/6vJ+apQyuo0+M3Ai0GS3wu7X9HBUDcA0zIHA3mOxWNz6toA==", + "version": "0.46.2", + "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.46.2.tgz", + "integrity": "sha512-wjbOghUDqy4gNgW2TNkGOBCAfxwkWBUAyCEkqFZbrBKTGZ1DVbHB1YZOTwVlQNIcDcLWTZQz2AnIK1HjQC/rIQ==", "dev": true, "hasInstallScript": true, "bin": { "dprint": "bin.js" }, "optionalDependencies": { - "@dprint/darwin-arm64": "0.45.0", - "@dprint/darwin-x64": "0.45.0", - "@dprint/linux-arm64-glibc": "0.45.0", - "@dprint/linux-arm64-musl": "0.45.0", - "@dprint/linux-x64-glibc": "0.45.0", - "@dprint/linux-x64-musl": "0.45.0", - "@dprint/win32-x64": "0.45.0" + "@dprint/darwin-arm64": "0.46.2", + "@dprint/darwin-x64": "0.46.2", + "@dprint/linux-arm64-glibc": "0.46.2", + "@dprint/linux-arm64-musl": "0.46.2", + "@dprint/linux-x64-glibc": "0.46.2", + "@dprint/linux-x64-musl": "0.46.2", + "@dprint/win32-x64": "0.46.2" } }, "node_modules/emoji-regex": { diff --git a/package.json b/package.json index 41967ee26..6e38ff76f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "cross-env": "^7.0.3", "del-cli": "^5.1.0", "docdash": "^2.0.2", - "dprint": "^0.45.0", + "dprint": "^0.46.2", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", From 1652c52bb68086cc78bdfce8a330903dd7751b4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:21:33 -0400 Subject: [PATCH 31/53] Bump @rollup/plugin-commonjs from 25.0.7 to 26.0.1 (#948) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 282 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 264 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35076666e..7934757d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "webextension-polyfill": "^0.12.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-typescript": "^11.1.5", @@ -443,6 +443,102 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -508,6 +604,16 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@reduxjs/toolkit": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.2.1.tgz", @@ -532,20 +638,20 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.7", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", - "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-26.0.1.tgz", + "integrity": "sha512-UnsKoZK6/aGIH6AdkptXhNvhaqftcjq3zZdT+LY5Ftms6JR06nADcDsYp5hTU9E2lbJUEOhdlY5J4DNTneM+jQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", - "glob": "^8.0.3", + "glob": "^10.4.1", "is-reference": "1.2.1", "magic-string": "^0.30.3" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0 || 14 >= 14.17" }, "peerDependencies": { "rollup": "^2.68.0||^3.0.0||^4.0.0" @@ -1858,6 +1964,12 @@ "@dprint/win32-x64": "0.46.2" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2513,6 +2625,34 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/framer-motion": { "version": "11.2.2", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.2.2.tgz", @@ -2644,19 +2784,22 @@ } }, "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2684,15 +2827,18 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/globals": { @@ -3464,6 +3610,24 @@ "set-function-name": "^2.0.1" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jquery": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", @@ -3892,6 +4056,15 @@ "node": ">= 6" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -4271,6 +4444,31 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5016,6 +5214,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", @@ -5093,6 +5306,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -5523,6 +5749,24 @@ "node": ">=8" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 6e38ff76f..abbb2c78a 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "webextension-polyfill": "^0.12.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-typescript": "^11.1.5", From 645892d1984da31e041eaa5de7f8fc23930cfbd5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:34:45 -0400 Subject: [PATCH 32/53] Bump braces from 3.0.2 to 3.0.3 (#951) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7934757d8..811915571 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1442,12 +1442,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2570,9 +2570,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" From 182cee66c061e4e91bb052a702fdf44790c63fd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:33:07 -0400 Subject: [PATCH 33/53] Bump inquirer from 9.2.15 to 9.3.2 (#955) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 86 +++++++++++++++-------------------------------- package.json | 2 +- 2 files changed, 29 insertions(+), 59 deletions(-) diff --git a/package-lock.json b/package-lock.json index 811915571..f6100ceda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", - "inquirer": "^9.2.15", + "inquirer": "^9.3.2", "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", @@ -443,6 +443,15 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, + "node_modules/@inquirer/figures": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.3.tgz", + "integrity": "sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==", + "dev": true, + "engines": { + "node": ">=18" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -557,18 +566,6 @@ "node": ">=v12.0.0" } }, - "node_modules/@ljharb/through": { - "version": "2.3.12", - "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.12.tgz", - "integrity": "sha512-ajo/heTlG3QgC8EGP6APIejksVAYt4ayz4tqoP3MolFELzcH1x1fzwEYRJTPO0IELutZ5HQ0c26/GqAYy79u3g==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.5" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2533,30 +2530,6 @@ "reusify": "^1.0.4" } }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3120,43 +3093,28 @@ "dev": true }, "node_modules/inquirer": { - "version": "9.2.15", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.15.tgz", - "integrity": "sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.2.tgz", + "integrity": "sha512-+ynEbhWKhyomnaX0n2aLIMSkgSlGB5RrWbNXnEqj6mdaIydu6y40MdBjL38SAB0JcdmOaIaMua1azdjLEr3sdw==", "dev": true, "dependencies": { - "@ljharb/through": "^2.3.12", + "@inquirer/figures": "^1.0.3", "ansi-escapes": "^4.3.2", - "chalk": "^5.3.0", - "cli-cursor": "^3.1.0", "cli-width": "^4.1.0", "external-editor": "^3.1.0", - "figures": "^3.2.0", - "lodash": "^4.17.21", "mute-stream": "1.0.0", "ora": "^5.4.1", "run-async": "^3.0.0", "rxjs": "^7.8.1", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0" + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.1" }, "engines": { "node": ">=18" } }, - "node_modules/inquirer/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", @@ -5805,6 +5763,18 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.1.tgz", + "integrity": "sha512-c6T13b6qYcJZvck7QbEFXrFX/Mu2KOjvAGiKHmYMUg96jxNpfP6i+psGW72BOPxOIDUJrORG+Kyu7quMX9CQBQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index abbb2c78a..33eea3291 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", - "inquirer": "^9.2.15", + "inquirer": "^9.3.2", "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", From 396e71e266f040fbe02cae40053add86e8550c77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:34:08 -0400 Subject: [PATCH 34/53] Bump dprint from 0.46.2 to 0.47.0 (#956) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 64 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6100ceda..b04422550 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "cross-env": "^7.0.3", "del-cli": "^5.1.0", "docdash": "^2.0.2", - "dprint": "^0.46.2", + "dprint": "^0.47.0", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", @@ -247,9 +247,9 @@ } }, "node_modules/@dprint/darwin-arm64": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.46.2.tgz", - "integrity": "sha512-IA/VIWwmIJ4a9rLB0paU0ryXFHRV+NHyWykDa4F+3WgbyXVlv1PVncW5wgfZJ38wQM8FDfPUO2Ar8+Nkx8Fkfg==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/darwin-arm64/-/darwin-arm64-0.47.0.tgz", + "integrity": "sha512-UoQA2kBSSooLx+DPUeml8xr75D7wwpNmH1xmDeX9c0JzFA5j7ZtykT/gNqGSRk9TRHH12nV3/e8VSamUbnbRfA==", "cpu": [ "arm64" ], @@ -260,9 +260,9 @@ ] }, "node_modules/@dprint/darwin-x64": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.46.2.tgz", - "integrity": "sha512-YMY40MsN1CL/8fGPcZaA/3KeE09GHt7y4ZRJGCw8Cx7AjZ3P+SlNxL6X9v72eXUfotzudcZc5yC72tdUFaN7oA==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/darwin-x64/-/darwin-x64-0.47.0.tgz", + "integrity": "sha512-gL2qYooB1mSatS0CQ6/UrplyUewnWD3cg1U7S+CZAVpgSkJgOX3haWinoD66kaBdWAPJo4NjeMnlIS7WVXmbXg==", "cpu": [ "x64" ], @@ -273,9 +273,9 @@ ] }, "node_modules/@dprint/linux-arm64-glibc": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.46.2.tgz", - "integrity": "sha512-brllu3G7nPV5GQTHnDF54ihGwgWHxRr03EQI0Mbbif94P/jl+Dqf9I6qWBSDVt/zQTThY1aYIZt+mpblD4oXZQ==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-glibc/-/linux-arm64-glibc-0.47.0.tgz", + "integrity": "sha512-VrY41zk75f07tfD9bIiYpRom7j4jc/5a8ifWhebnA7jwitTIInkPBUAwJwygGQA/bY7uKYuoykEnipjOzXE48A==", "cpu": [ "arm64" ], @@ -286,9 +286,9 @@ ] }, "node_modules/@dprint/linux-arm64-musl": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.46.2.tgz", - "integrity": "sha512-+9pF6qmSMobvtlTk/PnyqYE66nlwyrg7TeJb+RhqAT3y40v8TT4XafdK5p5GOrC1qf1QV4PCLAuOrHAKaYLNqg==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-arm64-musl/-/linux-arm64-musl-0.47.0.tgz", + "integrity": "sha512-UlrOe1cD/bZmoGVdxo7wpIn6DI70SdPeeQe5LFex8csKERM1H0GmrwDTpHlvN2OzZ4W8d6j7dVQEw5K3defxSg==", "cpu": [ "arm64" ], @@ -299,9 +299,9 @@ ] }, "node_modules/@dprint/linux-x64-glibc": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.46.2.tgz", - "integrity": "sha512-iq0WfIyLrxaE0PVXw89FKwC2VIbo3Hb6PscEVtzWDOpm/bmURXs5JIjRFpAaGfwCZcwzds70bb7utT5ItgZtlA==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-glibc/-/linux-x64-glibc-0.47.0.tgz", + "integrity": "sha512-06j1qJtipRIds7I9f+gYAK5hNEjX3BoIT08axb9eo1VTUOUQjnJ4NwOBsT8rw8mqtTuePtWIWzZMsELom8UXZA==", "cpu": [ "x64" ], @@ -312,9 +312,9 @@ ] }, "node_modules/@dprint/linux-x64-musl": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.46.2.tgz", - "integrity": "sha512-Ins2SD0v5Q61b6WIcxnsoHT84E+kyiUjjespxcWzqLrXdPgy8ATLMfcx1vHS4ALD687+PkwCgPF8N2jK66Md6A==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/linux-x64-musl/-/linux-x64-musl-0.47.0.tgz", + "integrity": "sha512-yjT5Tua7E0aIaUvuyslfYf2h2NB6lipRFOMKySX5MHSjKHjJKdXiIddaTx9EHg6NHzyrYYH6/jD2ZqllgKjY/g==", "cpu": [ "x64" ], @@ -325,9 +325,9 @@ ] }, "node_modules/@dprint/win32-x64": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.46.2.tgz", - "integrity": "sha512-4msLVoyMppU5yPlxnCU0ibk6ahSQs1vcc7ToJkOi3LiCqu/KU+hYk2+bwqiZaQ1usi24iA9AIB+aBVA6X3VDXg==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/@dprint/win32-x64/-/win32-x64-0.47.0.tgz", + "integrity": "sha512-gfqV74GdQF7DWH5ClpottRS5qrEb14KncMR/bkL5ek40JqZZAeRFfYpWnuppE2rm5j9iQ+vs3Yx/YsW2u13q6Q==", "cpu": [ "x64" ], @@ -1943,22 +1943,22 @@ "integrity": "sha512-yoU4rhgPKCo+p5UrWWWNKiIq+ToGqmVVhk0PmMYBK4kRsR3/qhemNFL8f6CFmBd4gMwm3F4T7HBoydP5uY07fA==" }, "node_modules/dprint": { - "version": "0.46.2", - "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.46.2.tgz", - "integrity": "sha512-wjbOghUDqy4gNgW2TNkGOBCAfxwkWBUAyCEkqFZbrBKTGZ1DVbHB1YZOTwVlQNIcDcLWTZQz2AnIK1HjQC/rIQ==", + "version": "0.47.0", + "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.0.tgz", + "integrity": "sha512-rcfbkLkxVusprh4DNvv8fzpnwZmAk3ttHzu6gOeZyeq8AtH86Py4sPcJ1XZKs/iD29QOUAbObR2VQm49NFAAxw==", "dev": true, "hasInstallScript": true, "bin": { "dprint": "bin.js" }, "optionalDependencies": { - "@dprint/darwin-arm64": "0.46.2", - "@dprint/darwin-x64": "0.46.2", - "@dprint/linux-arm64-glibc": "0.46.2", - "@dprint/linux-arm64-musl": "0.46.2", - "@dprint/linux-x64-glibc": "0.46.2", - "@dprint/linux-x64-musl": "0.46.2", - "@dprint/win32-x64": "0.46.2" + "@dprint/darwin-arm64": "0.47.0", + "@dprint/darwin-x64": "0.47.0", + "@dprint/linux-arm64-glibc": "0.47.0", + "@dprint/linux-arm64-musl": "0.47.0", + "@dprint/linux-x64-glibc": "0.47.0", + "@dprint/linux-x64-musl": "0.47.0", + "@dprint/win32-x64": "0.47.0" } }, "node_modules/eastasianwidth": { diff --git a/package.json b/package.json index 33eea3291..069047f46 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "cross-env": "^7.0.3", "del-cli": "^5.1.0", "docdash": "^2.0.2", - "dprint": "^0.46.2", + "dprint": "^0.47.0", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", From c92cf47ff088c246abdf7f721d7f442e3c55f296 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:47:20 -0400 Subject: [PATCH 35/53] Bump typescript from 5.4.3 to 5.5.3 (#957) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b04422550..071daeb5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", - "typescript": "^5.4.3" + "typescript": "^5.5.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -5507,9 +5507,9 @@ } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 069047f46..fdd33c18b 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,6 @@ "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", - "typescript": "^5.4.3" + "typescript": "^5.5.3" } } From 6ec88fb443e0ecd8cea0a335b9cd9fecbb0cff79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:37:34 -0400 Subject: [PATCH 36/53] Bump iter-ops from 3.1.1 to 3.2.0 (#958) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 071daeb5b..346a51891 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "codemirror": "^5.65.16", "dompurify": "^3.1.0", "framer-motion": "^11.2.2", - "iter-ops": "^3.1.1", + "iter-ops": "^3.2.0", "jquery": "^3.7.1", "pako": "^0.2.6", "react": "^18.3.0", @@ -3548,9 +3548,9 @@ "dev": true }, "node_modules/iter-ops": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/iter-ops/-/iter-ops-3.1.1.tgz", - "integrity": "sha512-PelZCVYx+R7MEY6DykEXBANPT2I+Hrdz/Xk9G1vQvZlf+ORdoakNUrSbnvdQGx6AlxojziOnFHRrNEU7QllxAQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/iter-ops/-/iter-ops-3.2.0.tgz", + "integrity": "sha512-CK3AYKQOMIuo0mpFm5wthNBmWuVgaiwqPa56Efl7S7lvRWh8f7sgtanVVSq/QUO3SoSWNLXJU19NNn3F4RmI1g==", "engines": { "node": ">=16" } diff --git a/package.json b/package.json index fdd33c18b..9ccb08898 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "codemirror": "^5.65.16", "dompurify": "^3.1.0", "framer-motion": "^11.2.2", - "iter-ops": "^3.1.1", + "iter-ops": "^3.2.0", "jquery": "^3.7.1", "pako": "^0.2.6", "react": "^18.3.0", From b9c6025fa87714b64b6dfb51cc79f8fb5ad8e130 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:39:32 -0400 Subject: [PATCH 37/53] Bump framer-motion from 11.2.2 to 11.3.2 (#962) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 346a51891..6e62f9745 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@reduxjs/toolkit": "^2.2.1", "codemirror": "^5.65.16", "dompurify": "^3.1.0", - "framer-motion": "^11.2.2", + "framer-motion": "^11.3.2", "iter-ops": "^3.2.0", "jquery": "^3.7.1", "pako": "^0.2.6", @@ -2627,9 +2627,9 @@ } }, "node_modules/framer-motion": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.2.2.tgz", - "integrity": "sha512-Jq65YXsRUUDPJ1VQ30pblGeE5g+a/oOKGiP3zlZT9whL652guO6KJjFhNXtcmatoVkyyNjZ2NDVPUlydpCprzA==", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.3.2.tgz", + "integrity": "sha512-RgjSzrNFZmedWcvmW4MMc84A7UcoY37jocadE3Mbg3o+UMofodfyeNnYD/HR15UhP22/bb5KOebNhYOj4mYkpQ==", "dependencies": { "tslib": "^2.4.0" }, diff --git a/package.json b/package.json index 9ccb08898..d3cad67de 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@reduxjs/toolkit": "^2.2.1", "codemirror": "^5.65.16", "dompurify": "^3.1.0", - "framer-motion": "^11.2.2", + "framer-motion": "^11.3.2", "iter-ops": "^3.2.0", "jquery": "^3.7.1", "pako": "^0.2.6", From 2c5a26857b52a7705f2e38e0ebf5f3b4f16c20af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:39:39 -0400 Subject: [PATCH 38/53] Bump inquirer from 9.3.2 to 10.0.1 (#960) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 551 ++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 237 insertions(+), 316 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e62f9745..78c1d2397 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", - "inquirer": "^9.3.2", + "inquirer": "^10.0.1", "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", @@ -443,6 +443,87 @@ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, + "node_modules/@inquirer/checkbox": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-2.3.10.tgz", + "integrity": "sha512-CTc864M2/523rKc9AglIzAcUCuPXDZENgc5S2KZFVRbnMzpXcYTsUWmbqSeL0XLvtlvEtNevkkVbfVhJpruOyQ==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/figures": "^1.0.3", + "@inquirer/type": "^1.4.0", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/confirm": { + "version": "3.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-3.1.14.tgz", + "integrity": "sha512-nbLSX37b2dGPtKWL3rPuR/5hOuD30S+pqJ/MuFiUEgN6GiMs8UMxiurKAMDzKt6C95ltjupa8zH6+3csXNHWpA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.2.tgz", + "integrity": "sha512-nguvH3TZar3ACwbytZrraRTzGqyxJfYJwv+ZwqZNatAosdWQMP1GV8zvmkNlBe2JeZSaw0WYBHZk52pDpWC9qA==", + "dev": true, + "dependencies": { + "@inquirer/figures": "^1.0.3", + "@inquirer/type": "^1.4.0", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.14.9", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-spinners": "^2.9.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/editor": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-2.1.14.tgz", + "integrity": "sha512-6nWpoJyVAKwAcv67bkbBmmi3f32xua79fP7TRmNUoR4K+B1GiOBsHO1YdvET/jvC+nTlBZL7puKAKyM7G+Lkzw==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/expand": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-2.1.14.tgz", + "integrity": "sha512-JcxsLajwPykF2kq6biIUdoOzTQ3LXqb8XMVrWkCprG/pFeU1SsxcSSFbF1T5jJGvvlTVcsE+JdGjbQ8ZRZ82RA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/figures": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.3.tgz", @@ -452,6 +533,108 @@ "node": ">=18" } }, + "node_modules/@inquirer/input": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-2.2.1.tgz", + "integrity": "sha512-Yl1G6h7qWydzrJwqN777geeJVaAFL5Ly83aZlw4xHf8Z/BoTMfKRheyuMaQwOG7LQ4e5nQP7PxXdEg4SzQ+OKw==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/number": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-1.0.2.tgz", + "integrity": "sha512-GcoK+Phxcln0Qw9e73S5a8B2Ejg3HgSTvNfDegIcS5/BKwUm8t5rejja1l09WXjZM9vrVbRDf9RzWtSUiWVYRQ==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/password": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-2.1.14.tgz", + "integrity": "sha512-sPzOkXLhWJQ96K6nPZFnF8XB8tsDrcCRobd1d3EDz81F+4hp8BbdmsnsQcqZ7oYDIOVM/mWJyIUtJ35TrssJxQ==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/prompts": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-5.1.2.tgz", + "integrity": "sha512-E+ndnfwtVQtcmPt888Hc/HAxJUHSaA6OIvyvLAQ5BLQv+t20GbYdFSjXeLgb47OpMU+aRsKA/ys+Zoylw3kTVg==", + "dev": true, + "dependencies": { + "@inquirer/checkbox": "^2.3.10", + "@inquirer/confirm": "^3.1.14", + "@inquirer/editor": "^2.1.14", + "@inquirer/expand": "^2.1.14", + "@inquirer/input": "^2.2.1", + "@inquirer/number": "^1.0.2", + "@inquirer/password": "^2.1.14", + "@inquirer/rawlist": "^2.1.14", + "@inquirer/select": "^2.3.10" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/rawlist": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-2.1.14.tgz", + "integrity": "sha512-pLpEzhKNQ/ugFAFfgCNaXljB+dcCwmXwR1jOxAbVeFIdB3l02E5gjI+h1rb136tq0T8JO6P5KFR1oTeld/wdrA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/type": "^1.4.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/select": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-2.3.10.tgz", + "integrity": "sha512-rr7iR0Zj1YFfgM8IUGimPD9Yukd+n/U63CnYT9kdum6DbRXtMxR45rrreP+EA9ixCnShr+W4xj7suRxC1+8t9g==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.2", + "@inquirer/figures": "^1.0.3", + "@inquirer/type": "^1.4.0", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.4.0.tgz", + "integrity": "sha512-AjOqykVyjdJQvtfkNDGUyMYGF8xN50VUxftCQWsOyIo4DFRLr6VQhW0VItGI1JIyQGCGgIpKa7hMMwNhZb4OIw==", + "dev": true, + "dependencies": { + "mute-stream": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1011,11 +1194,23 @@ "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, + "node_modules/@types/mute-stream": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", + "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.1.tgz", - "integrity": "sha512-DqJociPbZP1lbZ5SQPk4oag6W7AyaGMO6gSfRwq3PWl4PXTwJpRQJhDq4W0kzrg3w6tJ1SwlvGZ5uKFHY13LIg==", - "dev": true + "version": "20.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", + "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -1071,6 +1266,12 @@ "integrity": "sha512-10ql7A0qzBmFB+F+qAke/nP1PIonS0TXZAOMVOxEUsm+lGSW6uwVcISFNa0I4Oyj0884TZVWGGMIWeXOVSNFHw==", "dev": true }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==", + "dev": true + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -1391,37 +1592,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -1450,30 +1620,6 @@ "node": ">=8" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -1617,22 +1763,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "dependencies": { - "restore-cursor": "^3.1.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/cli-spinners": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", - "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true, "engines": { "node": ">=6" @@ -1650,15 +1784,6 @@ "node": ">= 12" } }, - "node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/codemirror": { "version": "5.65.16", "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.16.tgz", @@ -1816,18 +1941,6 @@ "node": ">=0.10.0" } }, - "node_modules/defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -2614,18 +2727,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/framer-motion": { "version": "11.3.2", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.3.2.tgz", @@ -3001,26 +3102,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -3093,23 +3174,18 @@ "dev": true }, "node_modules/inquirer": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.3.2.tgz", - "integrity": "sha512-+ynEbhWKhyomnaX0n2aLIMSkgSlGB5RrWbNXnEqj6mdaIydu6y40MdBjL38SAB0JcdmOaIaMua1azdjLEr3sdw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-10.0.1.tgz", + "integrity": "sha512-XgthhRIn0Ci9JdGJpUo2EtpPfaczbooZbGTN+FTzSCyUb7YHJcPPnuSXfeG5903bJMy3OyEoVTQMnvO4Ly5tFg==", "dev": true, "dependencies": { - "@inquirer/figures": "^1.0.3", + "@inquirer/prompts": "^5.1.2", + "@inquirer/type": "^1.3.3", + "@types/mute-stream": "^0.0.4", "ansi-escapes": "^4.3.2", - "cli-width": "^4.1.0", - "external-editor": "^3.1.0", - "mute-stream": "1.0.0", - "ora": "^5.4.1", + "mute-stream": "^1.0.0", "run-async": "^3.0.0", - "rxjs": "^7.8.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^6.2.0", - "yoctocolors-cjs": "^2.1.1" + "rxjs": "^7.8.1" }, "engines": { "node": ">=18" @@ -3305,15 +3381,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -3782,34 +3849,6 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -3961,15 +4000,6 @@ "node": ">=8.6" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -4213,21 +4243,6 @@ "wrappy": "1" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -4245,41 +4260,6 @@ "node": ">= 0.8.0" } }, - "node_modules/ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -4632,20 +4612,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/redent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", @@ -4754,19 +4720,6 @@ "node": ">=4" } }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4967,26 +4920,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", @@ -5094,10 +5027,16 @@ } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/slash": { "version": "4.0.0", @@ -5149,15 +5088,6 @@ "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -5546,6 +5476,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -5572,12 +5508,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -5588,15 +5518,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "dependencies": { - "defaults": "^1.0.3" - } - }, "node_modules/webextension-polyfill": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz", @@ -5765,9 +5686,9 @@ } }, "node_modules/yoctocolors-cjs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.1.tgz", - "integrity": "sha512-c6T13b6qYcJZvck7QbEFXrFX/Mu2KOjvAGiKHmYMUg96jxNpfP6i+psGW72BOPxOIDUJrORG+Kyu7quMX9CQBQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", + "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", "dev": true, "engines": { "node": ">=18" diff --git a/package.json b/package.json index d3cad67de..54ffcb999 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", - "inquirer": "^9.3.2", + "inquirer": "^10.0.1", "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", From 86e1b3c1250d3cd68625b3bf0f2aa0741d3ddd78 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 12:23:21 -0400 Subject: [PATCH 39/53] Fix macros in modmail (#963) --- extension/data/modules/macros.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/extension/data/modules/macros.js b/extension/data/modules/macros.js index 49d63149a..03f41683e 100644 --- a/extension/data/modules/macros.js +++ b/extension/data/modules/macros.js @@ -175,11 +175,19 @@ export default new Module({ getConfig(info.subreddit, (success, config) => { // if we're a mod, add macros to top level reply button. if (success && config.length > 0) { - const macroButtonHtml = - ``; - $body.find('.ThreadViewerReplyForm__replyFooter .selectWrapper').before( - `
${macroButtonHtml}
`, - ); + const macroButtonHtml = ` + + `; + $body.find(` + :is( + .ThreadViewerReplyForm__replyFooter, + .ThreadViewerReplyForm__replyFooterGroup + ) .selectWrapper + `).before(` +
${macroButtonHtml}
+ `); populateSelect('.tb-macro-select', info.subreddit, config, 'modmail'); } From ba20f727e291d6634700a7d032e797076ba78024 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 12:59:22 -0400 Subject: [PATCH 40/53] More release meta fixes (#965) --- .github/workflows/publish-beta.yml | 4 +++- .github/workflows/publish-stable.yml | 2 +- CONTRIBUTING.md | 7 ++++--- extension/firefox_manifest.json | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index 72d7994e7..ed7e3aab5 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -1,4 +1,4 @@ -name: "Publish" +name: "Publish to beta listings" on: push: tags: @@ -8,6 +8,8 @@ jobs: build-release: runs-on: ubuntu-latest steps: + # TODO: somehow check if the pushed tag was a backport (i.e. it's a lower + # version than the latest beta release) and don't publish those. #964 - uses: actions/checkout@v3 - uses: actions/setup-node@v3 - run: npm ci diff --git a/.github/workflows/publish-stable.yml b/.github/workflows/publish-stable.yml index ba41a26b6..3c085c5f4 100644 --- a/.github/workflows/publish-stable.yml +++ b/.github/workflows/publish-stable.yml @@ -1,4 +1,4 @@ -name: "Publish" +name: "Publish to stable listings" on: push: tags: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d911b632b..e957bd3d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -102,13 +102,14 @@ As an example, a release timeline might look something like this: ### Tagging a New Release 1. Make sure the working directory is clear and you're on the `master` branch. -2. Run `npm run release`. This script will prompt you for the new four-segment version number, then the release name. +2. Update `firefox_manifest.json`'s `strict_min_version` to the latest ESR version of Firefox. [Here's a link to the FF release calendar for reference](https://whattrainisitnow.com/calendar/). (TODO: automate this somehow. this is necessary because AMO will eventually prevent you from uploading extensions where this number is too low, but we want to set it to _something_ to prevent people from using the extension in browser versions where it will obviously not work.) +3. Run `npm run release`. This script will prompt you for the new four-segment version number, then the release name. - Ensure the major.minor.patch is set correctly. You should only need to update this if the previous release was a stable release. - If the previous release was a beta release, increment the build number by 1. If the previous release was a stable release, instead reset the build number _to_ 1. - We generally only change the release name for major or minor bumps. If you're making a stable release and didn't change this during the beta series, make sure you update this to something appropriate for the new release. Tradition dictates it should be an adjective related to the development of the release, and an animal which start with the same letter. The script will then automatically commit and tag the release in your local clone. -3. Verify that the commit created by the release script contains nothing except changes to the version strings in the manifest files. -4. Push the commit and tag: `git push && git push --tags`. +4. Verify that the commit created by the release script contains nothing except changes to the version strings in the manifest files. +5. Push the commit and tag: `git push && git push --tags`. Once your tag is pushed to Github, the CI pipeline will generate release builds and automatically submit them to extension stores. Beta releases will be sent only to the beta listings; stable releases will result in updates to both the stable _and_ beta listings, with the beta listing receiving a beta-flagged build containing otherwise the same code. diff --git a/extension/firefox_manifest.json b/extension/firefox_manifest.json index eb82297d3..ccf0b2091 100644 --- a/extension/firefox_manifest.json +++ b/extension/firefox_manifest.json @@ -9,7 +9,7 @@ "browser_specific_settings": { "gecko": { "id": "yes@jetpack", - "strict_min_version": "57.0" + "strict_min_version": "115.13" } }, "permissions": [ From 3aaa7115644f9c060ce4ba56207f9c4e1432d261 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 13:23:23 -0400 Subject: [PATCH 41/53] v7.0.0-beta.4 --- extension/chrome_manifest.json | 2 +- extension/firefox_manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/chrome_manifest.json b/extension/chrome_manifest.json index 0b2ea55dc..07eaa9bb6 100644 --- a/extension/chrome_manifest.json +++ b/extension/chrome_manifest.json @@ -4,7 +4,7 @@ "author": "toolbox team", "short_name": "toolbox", "description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.", - "version": "7.0.0.3", + "version": "7.0.0.4", "version_name": "7.0.0: \"Oh God Erin What Are You Doing\"", "incognito": "split", "permissions": [ diff --git a/extension/firefox_manifest.json b/extension/firefox_manifest.json index ccf0b2091..eb3acbf30 100644 --- a/extension/firefox_manifest.json +++ b/extension/firefox_manifest.json @@ -4,7 +4,7 @@ "author": "toolbox team", "short_name": "toolbox", "description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.", - "version": "7.0.0.3", + "version": "7.0.0.4", "version_name": "7.0.0: \"Oh God Erin What Are You Doing\"", "browser_specific_settings": { "gecko": { From 01712b0fa4be00938f6865252e63222713b56702 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 13:27:02 -0400 Subject: [PATCH 42/53] firefox is so picky about its version strings --- extension/firefox_manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/firefox_manifest.json b/extension/firefox_manifest.json index eb3acbf30..05524d7e4 100644 --- a/extension/firefox_manifest.json +++ b/extension/firefox_manifest.json @@ -9,7 +9,7 @@ "browser_specific_settings": { "gecko": { "id": "yes@jetpack", - "strict_min_version": "115.13" + "strict_min_version": "115.*" } }, "permissions": [ From 8b6b5df4abef6ef5669e0cb4f7bc3bbf0dd02951 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 13:27:16 -0400 Subject: [PATCH 43/53] v7.0.0-beta.5 --- extension/chrome_manifest.json | 2 +- extension/firefox_manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/chrome_manifest.json b/extension/chrome_manifest.json index 07eaa9bb6..6ddd7b660 100644 --- a/extension/chrome_manifest.json +++ b/extension/chrome_manifest.json @@ -4,7 +4,7 @@ "author": "toolbox team", "short_name": "toolbox", "description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.", - "version": "7.0.0.4", + "version": "7.0.0.5", "version_name": "7.0.0: \"Oh God Erin What Are You Doing\"", "incognito": "split", "permissions": [ diff --git a/extension/firefox_manifest.json b/extension/firefox_manifest.json index 05524d7e4..d2516f418 100644 --- a/extension/firefox_manifest.json +++ b/extension/firefox_manifest.json @@ -4,7 +4,7 @@ "author": "toolbox team", "short_name": "toolbox", "description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.", - "version": "7.0.0.4", + "version": "7.0.0.5", "version_name": "7.0.0: \"Oh God Erin What Are You Doing\"", "browser_specific_settings": { "gecko": { From cd54af40ca4cb9d1094d7a3b044a78ed598b4ce9 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 13:33:27 -0400 Subject: [PATCH 44/53] please accept this string i am begging you --- extension/firefox_manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/firefox_manifest.json b/extension/firefox_manifest.json index d2516f418..458c25a49 100644 --- a/extension/firefox_manifest.json +++ b/extension/firefox_manifest.json @@ -9,7 +9,7 @@ "browser_specific_settings": { "gecko": { "id": "yes@jetpack", - "strict_min_version": "115.*" + "strict_min_version": "115.0" } }, "permissions": [ From 820294eab86edecc2a5659221c4e6aa4ab7a404e Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 16 Jul 2024 13:33:36 -0400 Subject: [PATCH 45/53] v7.0.0-beta.6 --- extension/chrome_manifest.json | 2 +- extension/firefox_manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/chrome_manifest.json b/extension/chrome_manifest.json index 6ddd7b660..271aaf732 100644 --- a/extension/chrome_manifest.json +++ b/extension/chrome_manifest.json @@ -4,7 +4,7 @@ "author": "toolbox team", "short_name": "toolbox", "description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.", - "version": "7.0.0.5", + "version": "7.0.0.6", "version_name": "7.0.0: \"Oh God Erin What Are You Doing\"", "incognito": "split", "permissions": [ diff --git a/extension/firefox_manifest.json b/extension/firefox_manifest.json index 458c25a49..acd9e48d9 100644 --- a/extension/firefox_manifest.json +++ b/extension/firefox_manifest.json @@ -4,7 +4,7 @@ "author": "toolbox team", "short_name": "toolbox", "description": "A set of tools to be used by moderators on reddit in order to make their jobs easier.", - "version": "7.0.0.5", + "version": "7.0.0.6", "version_name": "7.0.0: \"Oh God Erin What Are You Doing\"", "browser_specific_settings": { "gecko": { From 7f55c1e9a409465a39203eca4111cbaa7c8ed8da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:15:58 -0400 Subject: [PATCH 46/53] Bump iter-ops from 3.2.0 to 3.4.0 (#973) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78c1d2397..f0b331f92 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "codemirror": "^5.65.16", "dompurify": "^3.1.0", "framer-motion": "^11.3.2", - "iter-ops": "^3.2.0", + "iter-ops": "^3.4.0", "jquery": "^3.7.1", "pako": "^0.2.6", "react": "^18.3.0", @@ -3615,11 +3615,11 @@ "dev": true }, "node_modules/iter-ops": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/iter-ops/-/iter-ops-3.2.0.tgz", - "integrity": "sha512-CK3AYKQOMIuo0mpFm5wthNBmWuVgaiwqPa56Efl7S7lvRWh8f7sgtanVVSq/QUO3SoSWNLXJU19NNn3F4RmI1g==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/iter-ops/-/iter-ops-3.4.0.tgz", + "integrity": "sha512-H8SP6TbWAj6a91Sxxm3HskU51hJK9kFYO3IIT5N6csh8aHafGBpwmQFcXwnplO68QP0fV5XHaxT6/pw69tP0Pg==", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/iterator.prototype": { diff --git a/package.json b/package.json index 54ffcb999..4a5311840 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "codemirror": "^5.65.16", "dompurify": "^3.1.0", "framer-motion": "^11.3.2", - "iter-ops": "^3.2.0", + "iter-ops": "^3.4.0", "jquery": "^3.7.1", "pako": "^0.2.6", "react": "^18.3.0", From 66274d1b888d4201e2a6d5782f2844a5981e7816 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:16:14 -0400 Subject: [PATCH 47/53] Bump inquirer from 10.0.1 to 10.1.7 (#972) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 184 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 101 insertions(+), 85 deletions(-) diff --git a/package-lock.json b/package-lock.json index f0b331f92..1386fa619 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", - "inquirer": "^10.0.1", + "inquirer": "^10.1.7", "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", @@ -444,14 +444,14 @@ "dev": true }, "node_modules/@inquirer/checkbox": { - "version": "2.3.10", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-2.3.10.tgz", - "integrity": "sha512-CTc864M2/523rKc9AglIzAcUCuPXDZENgc5S2KZFVRbnMzpXcYTsUWmbqSeL0XLvtlvEtNevkkVbfVhJpruOyQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-2.4.6.tgz", + "integrity": "sha512-PvTeflvpyZMknHBVh9g9GPaffO/zyHcLk2i2HQN7q79SN1e0Tq2orAVzLAaZR1E5YDAdOB94znJurxzY/0HbFg==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/figures": "^1.0.3", - "@inquirer/type": "^1.4.0", + "@inquirer/core": "^9.0.9", + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.2", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, @@ -460,28 +460,28 @@ } }, "node_modules/@inquirer/confirm": { - "version": "3.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-3.1.14.tgz", - "integrity": "sha512-nbLSX37b2dGPtKWL3rPuR/5hOuD30S+pqJ/MuFiUEgN6GiMs8UMxiurKAMDzKt6C95ltjupa8zH6+3csXNHWpA==", + "version": "3.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-3.1.21.tgz", + "integrity": "sha512-v4O/jX5b6nm7Kxf9Gn/pjIz8RzGp1e8paFTl2GuMGL2OIWcaR9fx1HhkB8CnHZrGo3J7scLwSsgTK1fG8olxZA==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0" + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2" }, "engines": { "node": ">=18" } }, "node_modules/@inquirer/core": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.2.tgz", - "integrity": "sha512-nguvH3TZar3ACwbytZrraRTzGqyxJfYJwv+ZwqZNatAosdWQMP1GV8zvmkNlBe2JeZSaw0WYBHZk52pDpWC9qA==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.0.9.tgz", + "integrity": "sha512-mvQmOz1hf5dtvY+bpVK22YiwLxn5arEhykSt1IWT5GS7ojgqKLSE9P8WXI4fPimtC0ggmnf0bVbKtERlIZkV0g==", "dev": true, "dependencies": { - "@inquirer/figures": "^1.0.3", - "@inquirer/type": "^1.4.0", + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.2", "@types/mute-stream": "^0.0.4", - "@types/node": "^20.14.9", + "@types/node": "^22.1.0", "@types/wrap-ansi": "^3.0.0", "ansi-escapes": "^4.3.2", "cli-spinners": "^2.9.2", @@ -497,13 +497,13 @@ } }, "node_modules/@inquirer/editor": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-2.1.14.tgz", - "integrity": "sha512-6nWpoJyVAKwAcv67bkbBmmi3f32xua79fP7TRmNUoR4K+B1GiOBsHO1YdvET/jvC+nTlBZL7puKAKyM7G+Lkzw==", + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-2.1.21.tgz", + "integrity": "sha512-p5JYfAmEA6nqqDVCX0Cuu6EACA6/qejVBVataMew29mld3mtBWXy1g29Co86UMDQIiHA4HpOkH0hQGHlOvbGSw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0", + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2", "external-editor": "^3.1.0" }, "engines": { @@ -511,13 +511,13 @@ } }, "node_modules/@inquirer/expand": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-2.1.14.tgz", - "integrity": "sha512-JcxsLajwPykF2kq6biIUdoOzTQ3LXqb8XMVrWkCprG/pFeU1SsxcSSFbF1T5jJGvvlTVcsE+JdGjbQ8ZRZ82RA==", + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-2.1.21.tgz", + "integrity": "sha512-SxoD3mM2UwS/ovRixXic9Aav84K9+zDXD54stIGxbNZ7AryJHtudQteXw73kFTlsZCH9AhHC1TmMyakpRiAhGw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0", + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -525,48 +525,48 @@ } }, "node_modules/@inquirer/figures": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.3.tgz", - "integrity": "sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.5.tgz", + "integrity": "sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@inquirer/input": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-2.2.1.tgz", - "integrity": "sha512-Yl1G6h7qWydzrJwqN777geeJVaAFL5Ly83aZlw4xHf8Z/BoTMfKRheyuMaQwOG7LQ4e5nQP7PxXdEg4SzQ+OKw==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-2.2.8.tgz", + "integrity": "sha512-DoLuc+DIJVZiDIn01hUQrxpPHF7MuE1bGfhxVfPWQDVFIqCoFQEmiUqMLx7zv4/pFArykY9j+i3uLUIOWqk+xg==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0" + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2" }, "engines": { "node": ">=18" } }, "node_modules/@inquirer/number": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-1.0.2.tgz", - "integrity": "sha512-GcoK+Phxcln0Qw9e73S5a8B2Ejg3HgSTvNfDegIcS5/BKwUm8t5rejja1l09WXjZM9vrVbRDf9RzWtSUiWVYRQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-1.0.9.tgz", + "integrity": "sha512-F5JqBCPnJTlLlZavRL15jGAtCXZGQiT64IMe2iOtcVIHQYYWecs5FpyqfkIDqvuOCyd4XgWPVmjeW+FssGEwFw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0" + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2" }, "engines": { "node": ">=18" } }, "node_modules/@inquirer/password": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-2.1.14.tgz", - "integrity": "sha512-sPzOkXLhWJQ96K6nPZFnF8XB8tsDrcCRobd1d3EDz81F+4hp8BbdmsnsQcqZ7oYDIOVM/mWJyIUtJ35TrssJxQ==", + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-2.1.21.tgz", + "integrity": "sha512-kaz2jtA4xp3Y4J+weEs/gTppEBRjY82pIAWz1ycU23f+Blrv8enK2d58H4sv2dvzHtsOAcRE+rF2OXkdseQuTQ==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0", + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2", "ansi-escapes": "^4.3.2" }, "engines": { @@ -574,33 +574,49 @@ } }, "node_modules/@inquirer/prompts": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-5.1.2.tgz", - "integrity": "sha512-E+ndnfwtVQtcmPt888Hc/HAxJUHSaA6OIvyvLAQ5BLQv+t20GbYdFSjXeLgb47OpMU+aRsKA/ys+Zoylw3kTVg==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-5.3.7.tgz", + "integrity": "sha512-rGXU6k1Vcf1Jn3tcMTKfxCNTkWhwS9moOCTGerWG1fLtjv94/ug+ZLuqp5tq5MBjSuxFIaFfNFSD8mQn24OnIw==", "dev": true, "dependencies": { - "@inquirer/checkbox": "^2.3.10", - "@inquirer/confirm": "^3.1.14", - "@inquirer/editor": "^2.1.14", - "@inquirer/expand": "^2.1.14", - "@inquirer/input": "^2.2.1", - "@inquirer/number": "^1.0.2", - "@inquirer/password": "^2.1.14", - "@inquirer/rawlist": "^2.1.14", - "@inquirer/select": "^2.3.10" + "@inquirer/checkbox": "^2.4.6", + "@inquirer/confirm": "^3.1.21", + "@inquirer/editor": "^2.1.21", + "@inquirer/expand": "^2.1.21", + "@inquirer/input": "^2.2.8", + "@inquirer/number": "^1.0.9", + "@inquirer/password": "^2.1.21", + "@inquirer/rawlist": "^2.2.3", + "@inquirer/search": "^1.0.6", + "@inquirer/select": "^2.4.6" }, "engines": { "node": ">=18" } }, "node_modules/@inquirer/rawlist": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-2.1.14.tgz", - "integrity": "sha512-pLpEzhKNQ/ugFAFfgCNaXljB+dcCwmXwR1jOxAbVeFIdB3l02E5gjI+h1rb136tq0T8JO6P5KFR1oTeld/wdrA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-2.2.3.tgz", + "integrity": "sha512-qEqDLgCJ5jIJVAo1BpJBmqJunX6HDlhbQFMsufMH2/v3T4IeNCXTGgDG0xu7qwaPfw92c1VMP64BSQJYYvKoPA==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/type": "^1.4.0", + "@inquirer/core": "^9.0.9", + "@inquirer/type": "^1.5.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/search": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-1.0.6.tgz", + "integrity": "sha512-dZ2zOsIHPo0NgUVfvYuC6aMqAq3mcGn/XPrMXjlQhoNtsN8/pR5BmavqSmlgQo9ZY25VXF3qohWX/JzBYxHypA==", + "dev": true, + "dependencies": { + "@inquirer/core": "^9.0.9", + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.2", "yoctocolors-cjs": "^2.1.2" }, "engines": { @@ -608,14 +624,14 @@ } }, "node_modules/@inquirer/select": { - "version": "2.3.10", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-2.3.10.tgz", - "integrity": "sha512-rr7iR0Zj1YFfgM8IUGimPD9Yukd+n/U63CnYT9kdum6DbRXtMxR45rrreP+EA9ixCnShr+W4xj7suRxC1+8t9g==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-2.4.6.tgz", + "integrity": "sha512-fjcZQGyIviUBQ0Msoyf92vCmmN7Xv99vzPoybhLGBCM4cCz+l/U3p2++F7/xDJwvH70YHcvWrk8aN7STmrHMsQ==", "dev": true, "dependencies": { - "@inquirer/core": "^9.0.2", - "@inquirer/figures": "^1.0.3", - "@inquirer/type": "^1.4.0", + "@inquirer/core": "^9.0.9", + "@inquirer/figures": "^1.0.5", + "@inquirer/type": "^1.5.2", "ansi-escapes": "^4.3.2", "yoctocolors-cjs": "^2.1.2" }, @@ -624,9 +640,9 @@ } }, "node_modules/@inquirer/type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.4.0.tgz", - "integrity": "sha512-AjOqykVyjdJQvtfkNDGUyMYGF8xN50VUxftCQWsOyIo4DFRLr6VQhW0VItGI1JIyQGCGgIpKa7hMMwNhZb4OIw==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.5.2.tgz", + "integrity": "sha512-w9qFkumYDCNyDZmNQjf/n6qQuvQ4dMC3BJesY4oF+yr0CxR5vxujflAVeIcS6U336uzi9GM0kAfZlLrZ9UTkpA==", "dev": true, "dependencies": { "mute-stream": "^1.0.0" @@ -1204,12 +1220,12 @@ } }, "node_modules/@types/node": { - "version": "20.14.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", - "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.13.0" } }, "node_modules/@types/normalize-package-data": { @@ -3174,13 +3190,13 @@ "dev": true }, "node_modules/inquirer": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-10.0.1.tgz", - "integrity": "sha512-XgthhRIn0Ci9JdGJpUo2EtpPfaczbooZbGTN+FTzSCyUb7YHJcPPnuSXfeG5903bJMy3OyEoVTQMnvO4Ly5tFg==", + "version": "10.1.7", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-10.1.7.tgz", + "integrity": "sha512-GFlmyLseYNfArEihk9ufjmnVJGDrZIv+zh8Qai2LaYH7g9yqHftR0BQqo3rW1Dmjivj4VYL7+WE7GtxG6rAUnQ==", "dev": true, "dependencies": { - "@inquirer/prompts": "^5.1.2", - "@inquirer/type": "^1.3.3", + "@inquirer/prompts": "^5.3.7", + "@inquirer/type": "^1.5.2", "@types/mute-stream": "^0.0.4", "ansi-escapes": "^4.3.2", "mute-stream": "^1.0.0", @@ -5477,9 +5493,9 @@ "dev": true }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", "dev": true }, "node_modules/universalify": { diff --git a/package.json b/package.json index 4a5311840..4dfb653e0 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-react": "^7.34.0", - "inquirer": "^10.0.1", + "inquirer": "^10.1.7", "jsdoc": "^4.0.2", "rollup": "^4.9.6", "rollup-plugin-copy": "^3.5.0", From 2efd9c9a1053a5533303ffec59509246e20fecaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:52:26 -0400 Subject: [PATCH 48/53] Bump eslint-plugin-react from 7.34.0 to 7.35.0 (#966) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 484 +++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 290 insertions(+), 196 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1386fa619..136ae7527 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "dprint": "^0.47.0", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-react": "^7.34.0", + "eslint-plugin-react": "^7.35.0", "inquirer": "^10.1.7", "jsdoc": "^4.0.2", "rollup": "^4.9.6", @@ -1421,15 +1421,16 @@ } }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -1449,15 +1450,16 @@ } }, "node_modules/array.prototype.findlast": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.4.tgz", - "integrity": "sha512-BMtLxpV+8BD+6ZPFIWmnUBpQoy+A+ujcg4rhp2iwCRJYA7PEh2MS4NL3lz8EiDlLrJPp2hg9qWihr5pd//jcGw==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", + "es-abstract": "^1.23.2", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" }, "engines": { @@ -1522,29 +1524,20 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.toreversed": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, "node_modules/array.prototype.tosorted": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz", - "integrity": "sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.1.0", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/arraybuffer.prototype.slice": { @@ -1578,15 +1571,6 @@ "node": ">=0.10.0" } }, - "node_modules/asynciterator.prototype": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", - "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", @@ -1879,6 +1863,57 @@ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", "devOptional": true }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2121,17 +2156,21 @@ } }, "node_modules/es-abstract": { - "version": "1.22.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", - "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", @@ -2142,10 +2181,11 @@ "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.1", + "hasown": "^2.0.2", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.3", @@ -2156,17 +2196,17 @@ "object-keys": "^1.1.1", "object.assign": "^4.1.5", "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.0", + "safe-array-concat": "^1.1.2", "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.2", "typed-array-byte-length": "^1.0.1", "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.5", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -2197,26 +2237,37 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz", - "integrity": "sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ==", + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", "dev": true, "dependencies": { - "asynciterator.prototype": "^1.0.0", "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.4", + "es-abstract": "^1.23.3", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.2", + "es-set-tostringtag": "^2.0.3", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.1", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "internal-slot": "^1.0.7", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.1.0" + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -2428,35 +2479,35 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.34.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.0.tgz", - "integrity": "sha512-MeVXdReleBTdkz/bvcQMSnCXGi+c9kvy51IpinjnJgutl3YTHWsDdke7Z1ufZpGfDG8xduBDKyjtB9JH1eBKIQ==", + "version": "7.35.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz", + "integrity": "sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==", "dev": true, "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlast": "^1.2.4", + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", - "array.prototype.tosorted": "^1.1.3", + "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.0.17", + "es-iterator-helpers": "^1.0.19", "estraverse": "^5.3.0", + "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", - "object.entries": "^1.1.7", - "object.fromentries": "^2.0.7", - "object.hasown": "^1.1.3", - "object.values": "^1.1.7", + "object.entries": "^1.1.8", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.0", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.10" + "string.prototype.matchall": "^4.0.11", + "string.prototype.repeat": "^1.0.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "node_modules/eslint-plugin-react/node_modules/doctrine": { @@ -3083,9 +3134,9 @@ } }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -3325,6 +3376,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -3398,10 +3464,13 @@ } }, "node_modules/is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3516,10 +3585,13 @@ } }, "node_modules/is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3585,10 +3657,13 @@ } }, "node_modules/is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3606,13 +3681,16 @@ } }, "node_modules/is-weakset": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", + "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4178,28 +4256,29 @@ } }, "node_modules/object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", + "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -4220,28 +4299,15 @@ "get-intrinsic": "^1.2.1" } }, - "node_modules/object.hasown": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.3.tgz", - "integrity": "sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -4658,16 +4724,16 @@ } }, "node_modules/reflect.getprototypeof": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz", - "integrity": "sha512-62wgfC8dJWrmxv44CA36pLDnP6KKl3Vhxb7PL+8+qrrFMMoJij4vgiMP8zV4O8+CBMXY1mHxI5fITGHXFHVmQQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", + "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0", - "get-intrinsic": "^1.2.3", + "es-abstract": "^1.23.1", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", "which-builtin-type": "^1.1.3" }, @@ -4919,13 +4985,13 @@ } }, "node_modules/safe-array-concat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", - "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", - "get-intrinsic": "^1.2.2", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -4994,14 +5060,15 @@ } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5029,14 +5096,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5134,34 +5205,51 @@ } }, "node_modules/string.prototype.matchall": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", - "integrity": "sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz", + "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", - "regexp.prototype.flags": "^1.5.0", - "set-function-name": "^2.0.0", - "side-channel": "^1.0.4" + "internal-slot": "^1.0.7", + "regexp.prototype.flags": "^1.5.2", + "set-function-name": "^2.0.2", + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -5171,28 +5259,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5433,9 +5524,9 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.5.tgz", - "integrity": "sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { "call-bind": "^1.0.7", @@ -5571,13 +5662,13 @@ } }, "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", + "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", "dev": true, "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", "is-date-object": "^1.0.5", "is-finalizationregistry": "^1.0.2", @@ -5586,8 +5677,8 @@ "is-weakref": "^1.0.2", "isarray": "^2.0.5", "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -5597,31 +5688,34 @@ } }, "node_modules/which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", "dev": true, "dependencies": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", - "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.6", - "call-bind": "^1.0.5", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.1" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" diff --git a/package.json b/package.json index 4dfb653e0..1a6e939c2 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dprint": "^0.47.0", "eslint": "^8.57.0", "eslint-plugin-import": "^2.29.0", - "eslint-plugin-react": "^7.34.0", + "eslint-plugin-react": "^7.35.0", "inquirer": "^10.1.7", "jsdoc": "^4.0.2", "rollup": "^4.9.6", From 2ab3bca670b70234390b7dd3cb7e231637dbda1b Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 5 Aug 2024 12:26:50 -0400 Subject: [PATCH 49/53] fail CI if NOMERGE/XXX comments are present (#974) --- .eslintrc.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index 94f934b60..6fa1fd691 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -33,6 +33,15 @@ "no-return-await": "error", "no-sequences": "error", "no-var": "error", + // these comment markers fail CI (notes to self in code that need to be + // resolved before a PR can be merged) + "no-warning-comments": [ + "error", + { + "terms": ["XXX", "NOMERGE"], + "location": "anywhere" + } + ], "prefer-arrow-callback": "error", "prefer-const": "error", "prefer-numeric-literals": "error", From ccc865f42624f5fb35c890073b08628fd184558c Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 5 Aug 2024 14:12:28 -0400 Subject: [PATCH 50/53] fix up imports, add notes for removed settings --- extension/data/modules/modbutton.js | 5 ++--- extension/data/modules/usernotes.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/extension/data/modules/modbutton.js b/extension/data/modules/modbutton.js index d4e947338..db5e3797d 100644 --- a/extension/data/modules/modbutton.js +++ b/extension/data/modules/modbutton.js @@ -1,15 +1,14 @@ import $ from 'jquery'; import {createElement} from 'react'; -import {renderInSlots} from '../frontends/index.js'; +import {renderInSlots} from '../frontends/index.tsx'; import * as TBApi from '../tbapi.ts'; import * as TBCore from '../tbcore.js'; import * as TBHelpers from '../tbhelpers.js'; -import TBListener from '../tblistener.js'; import {Module} from '../tbmodule.jsx'; import * as TBStorage from '../tbstorage.js'; import * as TBui from '../tbui.js'; -import {JQueryRenderer} from '../util/ui_interop.js'; +import {JQueryRenderer} from '../util/ui_interop.tsx'; const MAX_BAN_REASON_LENGTH = 300; const MAX_BAN_MESSAGE_LENGTH = 5000; diff --git a/extension/data/modules/usernotes.js b/extension/data/modules/usernotes.js index 2d226ada3..44f01541d 100644 --- a/extension/data/modules/usernotes.js +++ b/extension/data/modules/usernotes.js @@ -9,7 +9,6 @@ import * as TBHelpers from '../tbhelpers.js'; import {Module} from '../tbmodule.jsx'; import * as TBStorage from '../tbstorage.js'; import * as TBui from '../tbui.js'; -import {currentPlatform, RedditPlatform} from '../util/platform.ts'; import {JQueryRenderer} from '../util/ui_interop.tsx'; // FIXME: It no longer makes sense to bake logger functions into modules @@ -48,6 +47,7 @@ const self = new Module({ advanced: true, description: 'Max characters to display in current note tag (excluding date)', }, + // NOMERGE - remove this setting it's unused now { id: 'onlyshowInhover', type: 'boolean', @@ -61,7 +61,7 @@ const self = new Module({ }); export default self; -function startUsernotes ({maxChars, showDate, onlyshowInhover}) { +function startUsernotes ({maxChars, showDate}) { const subs = []; const $body = $('body'); const self = this; From 951b9424345412dd224fe10dd8d2c3bbe123d3ea Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 5 Aug 2024 14:12:39 -0400 Subject: [PATCH 51/53] convert history button to slots --- extension/data/modules/historybutton.js | 43 +++++++++++-------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/extension/data/modules/historybutton.js b/extension/data/modules/historybutton.js index 38b47eea3..3f7a6b81d 100644 --- a/extension/data/modules/historybutton.js +++ b/extension/data/modules/historybutton.js @@ -1,13 +1,16 @@ import $ from 'jquery'; +import {createElement} from 'react'; import * as TBApi from '../tbapi.ts'; import * as TBCore from '../tbcore.js'; import * as TBHelpers from '../tbhelpers.js'; -import TBListener from '../tblistener.js'; import {Module} from '../tbmodule.jsx'; import * as TBStorage from '../tbstorage.js'; import * as TBui from '../tbui.js'; +import {renderInSlots} from '../frontends/index.tsx'; +import {JQueryRenderer} from '../util/ui_interop.tsx'; + const self = new Module({ name: 'History Button', id: 'HButton', @@ -34,6 +37,7 @@ const self = new Module({ advanced: true, description: 'Number of comments to retrieve per user history', }, + // XXX: delete this setting as it's now unused { id: 'onlyshowInhover', type: 'boolean', @@ -67,33 +71,24 @@ self.attachHistoryButton = function ($target, author, subreddit, buttonText = 'H }); }; -self.runJsAPI = function ({onlyshowInhover}) { +self.runJsAPI = function () { self.log('run'); - TBListener.on('author', e => { - const $target = $(e.target); - // Skip adding the button next to the username if: - // - the onlyShowInHover preference is set, - // - we're not on old reddit (since the preference doesn't work there), and - // - we didn't make the thing the author is on (since the hovercard doesn't show up on constructed things). - if (onlyshowInhover && !TBCore.isOldReddit && !$target.closest('.tb-thing').length) { - return; - } - const author = e.detail.data.author; - const subreddit = e.detail.data.subreddit && e.detail.data.subreddit.name; + renderInSlots([ + 'submissionAuthor', + 'commentAuthor', + 'userHovercard', + ], ({details, location}) => { + const subreddit = details.subreddit.name; + const user = !details.user.deleted && details.user.name; - if (author === '[deleted]') { - return; + if (details.user.deleted) { + return null; } - self.attachHistoryButton($target, author, subreddit); - }); - - TBListener.on('userHovercard', e => { - const $target = $(e.target); - const author = e.detail.data.user.username; - const subreddit = e.detail.data.subreddit && e.detail.data.subreddit.name; - self.attachHistoryButton($target, author, subreddit, 'User History'); + const $target = $(''); + self.attachHistoryButton($target, user, subreddit, location === 'userHovercard' ? 'User History' : undefined); + return createElement(JQueryRenderer, {content: $target}); }); window.addEventListener('TBNewPage', event => { @@ -127,7 +122,7 @@ async function init (options) { self.log('mscheck passed'); - self.runJsAPI(options); + self.runJsAPI(); $body.on('click', '.user-history-button, #tb-user-history', function (event) { const $this = $(this); From b0660cf6bd91439123fcb218f883ebad66addf5c Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 5 Aug 2024 14:13:07 -0400 Subject: [PATCH 52/53] kinda start converting nuke button badly --- extension/data/modules/nukecomments.js | 63 ++++++++++++++------------ 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/extension/data/modules/nukecomments.js b/extension/data/modules/nukecomments.js index b9a91465c..fdb857670 100644 --- a/extension/data/modules/nukecomments.js +++ b/extension/data/modules/nukecomments.js @@ -1,12 +1,15 @@ import $ from 'jquery'; +import {createElement} from 'react'; +import {renderInSlots} from '../frontends/index.tsx'; +import {useFetched} from '../hooks.js'; import * as TBApi from '../tbapi.ts'; import * as TBCore from '../tbcore.js'; import * as TBHelpers from '../tbhelpers.js'; -import TBListener from '../tblistener.js'; import {Module} from '../tbmodule.jsx'; import * as TBStorage from '../tbstorage.js'; import * as TBui from '../tbui.js'; +import {JQueryRenderer} from '../util/ui_interop.tsx'; export default new Module({ name: 'Comment Nuke', @@ -282,37 +285,41 @@ export default new Module({ } // Add nuke buttons where needed - TBListener.on('comment', async e => { - const pageType = TBCore.pageDetails.pageType; - const $target = $(e.target); - const subreddit = e.detail.data.subreddit.name; - const commentID = e.detail.data.id.substring(3); - const postID = e.detail.data.post.id.substring(3); + // XXX 3: this also needs to be able to appear in hovercards apparently?? what + // the fuck is going on with all the special casing in this goddamn module + renderInSlots(['commentAuthor'], ({details, location}) => { + const subreddit = details.subreddit.name; + const commentID = details.comment.fullname.substring(3); + const submissionID = details.submission?.fullname.substring(3); - const isMod = await TBCore.isModSub(subreddit); - // We have to mod the subreddit to show the button - if (!isMod) { - return; - } - // We also have to be on a comments page or looking at a context popup - if ( - pageType !== 'subredditCommentsPage' && pageType !== 'subredditCommentPermalink' - && !$target.closest('.context-button-popup').length - ) { - return; + const isMod = useFetched(TBCore.isModSub(subreddit)); + if (!commentID || !submissionID || !isMod) { + return null; } + // XXX: implement the old check that makes this only show up in comments + // trees and context pages and context popups. i don't know how this + // will be done but we do not want this button showing up on single + // comments in flat listings because thats just not reasonable and we + // dont want to encourage people to act on a whole tree in a vacuum + const NukeButtonHTML = - `${ - e.detail.type === 'TBcommentOldReddit' && !showNextToUser ? 'Nuke' : 'R' + `${ + location === 'userHovercard' ? 'Nuke' : 'R' }`; - if (showNextToUser && TBCore.isOldReddit) { - const $userContainter = $target.closest('.entry, .tb-comment-entry').find( - '.tb-jsapi-author-container .tb-frontend-container', - ); - $userContainter.append(NukeButtonHTML); - } else { - $target.append(NukeButtonHTML); - } + + // XXX 2: implement showNextToUser setting. for now we always show next + // to the author name because we don't have any other slots implemented + // on comments but when this changes we should revisit this. old logic: + // if (showNextToUser && TBCore.isOldReddit) { + // const $userContainter = $target.closest('.entry, .tb-comment-entry').find( + // '.tb-jsapi-author-container .tb-frontend-container', + // ); + // $userContainter.append(NukeButtonHTML); + // } else { + // $target.append(NukeButtonHTML); + // } + + return createElement(JQueryRenderer, {content: $(NukeButtonHTML)}); }); }); From 43a2606635ae2431fc024c45c03028f07bcd2b52 Mon Sep 17 00:00:00 2001 From: Erin Date: Thu, 17 Oct 2024 01:45:36 -0400 Subject: [PATCH 53/53] fix import file extension --- extension/data/modules/nukecomments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/data/modules/nukecomments.js b/extension/data/modules/nukecomments.js index fdb857670..662a191af 100644 --- a/extension/data/modules/nukecomments.js +++ b/extension/data/modules/nukecomments.js @@ -2,7 +2,7 @@ import $ from 'jquery'; import {createElement} from 'react'; import {renderInSlots} from '../frontends/index.tsx'; -import {useFetched} from '../hooks.js'; +import {useFetched} from '../hooks.ts'; import * as TBApi from '../tbapi.ts'; import * as TBCore from '../tbcore.js'; import * as TBHelpers from '../tbhelpers.js';