From d55b767039605256c736166a942a9138e3eacfd7 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 29 Jun 2025 11:49:28 -0700 Subject: remove dev node_modules (oops) --- .../date-fns/esm/formatDistanceStrict/index.d.ts | 4 - .../date-fns/esm/formatDistanceStrict/index.js | 190 --------------------- .../esm/formatDistanceStrict/index.js.flow | 61 ------- .../date-fns/esm/formatDistanceStrict/package.json | 4 - 4 files changed, 259 deletions(-) delete mode 100644 node_modules/date-fns/esm/formatDistanceStrict/index.d.ts delete mode 100644 node_modules/date-fns/esm/formatDistanceStrict/index.js delete mode 100644 node_modules/date-fns/esm/formatDistanceStrict/index.js.flow delete mode 100644 node_modules/date-fns/esm/formatDistanceStrict/package.json (limited to 'node_modules/date-fns/esm/formatDistanceStrict') diff --git a/node_modules/date-fns/esm/formatDistanceStrict/index.d.ts b/node_modules/date-fns/esm/formatDistanceStrict/index.d.ts deleted file mode 100644 index 89cce20..0000000 --- a/node_modules/date-fns/esm/formatDistanceStrict/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. - -import { formatDistanceStrict } from 'date-fns' -export default formatDistanceStrict diff --git a/node_modules/date-fns/esm/formatDistanceStrict/index.js b/node_modules/date-fns/esm/formatDistanceStrict/index.js deleted file mode 100644 index 277c29d..0000000 --- a/node_modules/date-fns/esm/formatDistanceStrict/index.js +++ /dev/null @@ -1,190 +0,0 @@ -import { getDefaultOptions } from "../_lib/defaultOptions/index.js"; -import getTimezoneOffsetInMilliseconds from "../_lib/getTimezoneOffsetInMilliseconds/index.js"; -import compareAsc from "../compareAsc/index.js"; -import toDate from "../toDate/index.js"; -import cloneObject from "../_lib/cloneObject/index.js"; -import assign from "../_lib/assign/index.js"; -import defaultLocale from "../_lib/defaultLocale/index.js"; -import requiredArgs from "../_lib/requiredArgs/index.js"; -var MILLISECONDS_IN_MINUTE = 1000 * 60; -var MINUTES_IN_DAY = 60 * 24; -var MINUTES_IN_MONTH = MINUTES_IN_DAY * 30; -var MINUTES_IN_YEAR = MINUTES_IN_DAY * 365; - -/** - * @name formatDistanceStrict - * @category Common Helpers - * @summary Return the distance between the given dates in words. - * - * @description - * Return the distance between the given dates in words, using strict units. - * This is like `formatDistance`, but does not use helpers like 'almost', 'over', - * 'less than' and the like. - * - * | Distance between dates | Result | - * |------------------------|---------------------| - * | 0 ... 59 secs | [0..59] seconds | - * | 1 ... 59 mins | [1..59] minutes | - * | 1 ... 23 hrs | [1..23] hours | - * | 1 ... 29 days | [1..29] days | - * | 1 ... 11 months | [1..11] months | - * | 1 ... N years | [1..N] years | - * - * @param {Date|Number} date - the date - * @param {Date|Number} baseDate - the date to compare with - * @param {Object} [options] - an object with options. - * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first - * @param {'second'|'minute'|'hour'|'day'|'month'|'year'} [options.unit] - if specified, will force a unit - * @param {'floor'|'ceil'|'round'} [options.roundingMethod='round'] - which way to round partial units - * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} - * @returns {String} the distance in words - * @throws {TypeError} 2 arguments required - * @throws {RangeError} `date` must not be Invalid Date - * @throws {RangeError} `baseDate` must not be Invalid Date - * @throws {RangeError} `options.roundingMethod` must be 'floor', 'ceil' or 'round' - * @throws {RangeError} `options.unit` must be 'second', 'minute', 'hour', 'day', 'month' or 'year' - * @throws {RangeError} `options.locale` must contain `formatDistance` property - * - * @example - * // What is the distance between 2 July 2014 and 1 January 2015? - * const result = formatDistanceStrict(new Date(2014, 6, 2), new Date(2015, 0, 2)) - * //=> '6 months' - * - * @example - * // What is the distance between 1 January 2015 00:00:15 - * // and 1 January 2015 00:00:00? - * const result = formatDistanceStrict( - * new Date(2015, 0, 1, 0, 0, 15), - * new Date(2015, 0, 1, 0, 0, 0) - * ) - * //=> '15 seconds' - * - * @example - * // What is the distance from 1 January 2016 - * // to 1 January 2015, with a suffix? - * const result = formatDistanceStrict(new Date(2015, 0, 1), new Date(2016, 0, 1), { - * addSuffix: true - * }) - * //=> '1 year ago' - * - * @example - * // What is the distance from 1 January 2016 - * // to 1 January 2015, in minutes? - * const result = formatDistanceStrict(new Date(2016, 0, 1), new Date(2015, 0, 1), { - * unit: 'minute' - * }) - * //=> '525600 minutes' - * - * @example - * // What is the distance from 1 January 2015 - * // to 28 January 2015, in months, rounded up? - * const result = formatDistanceStrict(new Date(2015, 0, 28), new Date(2015, 0, 1), { - * unit: 'month', - * roundingMethod: 'ceil' - * }) - * //=> '1 month' - * - * @example - * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? - * import { eoLocale } from 'date-fns/locale/eo' - * const result = formatDistanceStrict(new Date(2016, 7, 1), new Date(2015, 0, 1), { - * locale: eoLocale - * }) - * //=> '1 jaro' - */ - -export default function formatDistanceStrict(dirtyDate, dirtyBaseDate, options) { - var _ref, _options$locale, _options$roundingMeth; - requiredArgs(2, arguments); - var defaultOptions = getDefaultOptions(); - var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale; - if (!locale.formatDistance) { - throw new RangeError('locale must contain localize.formatDistance property'); - } - var comparison = compareAsc(dirtyDate, dirtyBaseDate); - if (isNaN(comparison)) { - throw new RangeError('Invalid time value'); - } - var localizeOptions = assign(cloneObject(options), { - addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix), - comparison: comparison - }); - var dateLeft; - var dateRight; - if (comparison > 0) { - dateLeft = toDate(dirtyBaseDate); - dateRight = toDate(dirtyDate); - } else { - dateLeft = toDate(dirtyDate); - dateRight = toDate(dirtyBaseDate); - } - var roundingMethod = String((_options$roundingMeth = options === null || options === void 0 ? void 0 : options.roundingMethod) !== null && _options$roundingMeth !== void 0 ? _options$roundingMeth : 'round'); - var roundingMethodFn; - if (roundingMethod === 'floor') { - roundingMethodFn = Math.floor; - } else if (roundingMethod === 'ceil') { - roundingMethodFn = Math.ceil; - } else if (roundingMethod === 'round') { - roundingMethodFn = Math.round; - } else { - throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'"); - } - var milliseconds = dateRight.getTime() - dateLeft.getTime(); - var minutes = milliseconds / MILLISECONDS_IN_MINUTE; - var timezoneOffset = getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft); - - // Use DST-normalized difference in minutes for years, months and days; - // use regular difference in minutes for hours, minutes and seconds. - var dstNormalizedMinutes = (milliseconds - timezoneOffset) / MILLISECONDS_IN_MINUTE; - var defaultUnit = options === null || options === void 0 ? void 0 : options.unit; - var unit; - if (!defaultUnit) { - if (minutes < 1) { - unit = 'second'; - } else if (minutes < 60) { - unit = 'minute'; - } else if (minutes < MINUTES_IN_DAY) { - unit = 'hour'; - } else if (dstNormalizedMinutes < MINUTES_IN_MONTH) { - unit = 'day'; - } else if (dstNormalizedMinutes < MINUTES_IN_YEAR) { - unit = 'month'; - } else { - unit = 'year'; - } - } else { - unit = String(defaultUnit); - } - - // 0 up to 60 seconds - if (unit === 'second') { - var seconds = roundingMethodFn(milliseconds / 1000); - return locale.formatDistance('xSeconds', seconds, localizeOptions); - - // 1 up to 60 mins - } else if (unit === 'minute') { - var roundedMinutes = roundingMethodFn(minutes); - return locale.formatDistance('xMinutes', roundedMinutes, localizeOptions); - - // 1 up to 24 hours - } else if (unit === 'hour') { - var hours = roundingMethodFn(minutes / 60); - return locale.formatDistance('xHours', hours, localizeOptions); - - // 1 up to 30 days - } else if (unit === 'day') { - var days = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_DAY); - return locale.formatDistance('xDays', days, localizeOptions); - - // 1 up to 12 months - } else if (unit === 'month') { - var months = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_MONTH); - return months === 12 && defaultUnit !== 'month' ? locale.formatDistance('xYears', 1, localizeOptions) : locale.formatDistance('xMonths', months, localizeOptions); - - // 1 year up to max Date - } else if (unit === 'year') { - var years = roundingMethodFn(dstNormalizedMinutes / MINUTES_IN_YEAR); - return locale.formatDistance('xYears', years, localizeOptions); - } - throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'"); -} \ No newline at end of file diff --git a/node_modules/date-fns/esm/formatDistanceStrict/index.js.flow b/node_modules/date-fns/esm/formatDistanceStrict/index.js.flow deleted file mode 100644 index 26c4b15..0000000 --- a/node_modules/date-fns/esm/formatDistanceStrict/index.js.flow +++ /dev/null @@ -1,61 +0,0 @@ -// @flow -// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. - -export type Interval = { - start: Date | number, - end: Date | number, -} - -export type Locale = { - code?: string, - formatDistance?: (...args: Array) => any, - formatRelative?: (...args: Array) => any, - localize?: { - ordinalNumber: (...args: Array) => any, - era: (...args: Array) => any, - quarter: (...args: Array) => any, - month: (...args: Array) => any, - day: (...args: Array) => any, - dayPeriod: (...args: Array) => any, - }, - formatLong?: { - date: (...args: Array) => any, - time: (...args: Array) => any, - dateTime: (...args: Array) => any, - }, - match?: { - ordinalNumber: (...args: Array) => any, - era: (...args: Array) => any, - quarter: (...args: Array) => any, - month: (...args: Array) => any, - day: (...args: Array) => any, - dayPeriod: (...args: Array) => any, - }, - options?: { - weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6, - firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7, - }, -} - -export type Duration = { - years?: number, - months?: number, - weeks?: number, - days?: number, - hours?: number, - minutes?: number, - seconds?: number, -} - -export type Day = 0 | 1 | 2 | 3 | 4 | 5 | 6 - -declare module.exports: ( - date: Date | number, - baseDate: Date | number, - options?: { - addSuffix?: boolean, - unit?: 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year', - roundingMethod?: 'floor' | 'ceil' | 'round', - locale?: Locale, - } -) => string diff --git a/node_modules/date-fns/esm/formatDistanceStrict/package.json b/node_modules/date-fns/esm/formatDistanceStrict/package.json deleted file mode 100644 index b109f05..0000000 --- a/node_modules/date-fns/esm/formatDistanceStrict/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "sideEffects": false, - "typings": "../../typings.d.ts" -} \ No newline at end of file -- cgit v1.2.3