Skip to content

Commit

Permalink
fix(project): [wip] use fully resolved import paths
Browse files Browse the repository at this point in the history
fix

fix

fix

fix
  • Loading branch information
jeremyckahn committed Sep 1, 2024
1 parent d2ddc44 commit e3b8fc4
Show file tree
Hide file tree
Showing 404 changed files with 1,711 additions and 1,698 deletions.
2 changes: 1 addition & 1 deletion api-etc/templates.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { itemsMap } from '../src/data/maps'
import { itemsMap } from '../src/data/maps.js'

export const MARKET_SUMMARY_FOR_DISCORD = (_, room, valueAdjustments) => {
let string = `Current market values for the **${room}** room:\n`
Expand Down
6 changes: 3 additions & 3 deletions api-etc/utils.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const redis = require('redis')

const { generateValueAdjustments } = require('../src/common/utils')
const { MAX_ROOM_NAME_LENGTH } = require('../src/common/constants')
const { generateValueAdjustments } = require('../src/common/utils.js')
const { MAX_ROOM_NAME_LENGTH } = require('../src/common/constants.js')

const { GLOBAL_ROOM_KEY, ACCEPTED_ORIGINS } = require('./constants')
const { GLOBAL_ROOM_KEY, ACCEPTED_ORIGINS } = require('./constants.js')

module.exports.getRedisClient = () => {
const client = redis.createClient({
Expand Down
4 changes: 2 additions & 2 deletions api/get-market-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import { promisify } from 'util'

import 'redis'
import '../src/common/utils'
import '../src/common/utils.js'
// End explicit requires for serverless builds

import {
allowCors,
getRedisClient,
getRoomData,
getRoomName,
} from '../api-etc/utils'
} from '../api-etc/utils.js'

const client = getRedisClient()

Expand Down
10 changes: 5 additions & 5 deletions api/post-day-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// here to ensure that that they are included in serverless builds. Do NOT
// remove them unless they are not needed by any upstream modules.
import 'redis'
import '../src/common/utils'
import '../src/common/constants'
import '../api-etc/constants'
import '../src/common/utils.js'
import '../src/common/constants.js'
import '../api-etc/constants.js'
// End explicit requires for serverless builds

import { promisify } from 'util'
Expand All @@ -14,8 +14,8 @@ import {
getRedisClient,
getRoomData,
getRoomName,
} from '../api-etc/utils'
import { random } from '../src/common/utils'
} from '../api-etc/utils.js'
import { random } from '../src/common/utils.js'

const client = getRedisClient()

Expand Down
10 changes: 5 additions & 5 deletions api/publish-global-market-values-to-discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
// here to ensure that that they are included in serverless builds. Do NOT
// remove them unless they are not needed by any upstream modules.
import 'redis'
import '../src/common/utils'
import '../src/common/constants'
import '../api-etc/constants'
import '../src/common/utils.js'
import '../src/common/constants.js'
import '../api-etc/constants.js'
// End explicit requires for serverless builds

import { promisify } from 'util'

import axios from 'axios'

import { MARKET_SUMMARY_FOR_DISCORD } from '../api-etc/templates'
import { allowCors, getRedisClient, getRoomData } from '../api-etc/utils'
import { MARKET_SUMMARY_FOR_DISCORD } from '../api-etc/templates.js'
import { allowCors, getRedisClient, getRoomData } from '../api-etc/utils.js'

const client = getRedisClient()

Expand Down
2 changes: 1 addition & 1 deletion src/common/services/randomNumber.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import seedrandom from 'seedrandom'
import globalWindow from 'global/window'
import globalWindow from 'global/window.js'

export class RandomNumberService {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/common/services/randomNumber.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { randomNumberService } from './randomNumber'
import { randomNumberService } from './randomNumber.js'

describe('RandomNumberService', () => {
describe('isRandomNumberLessThan', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/common/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @typedef {import("../index").farmhand.priceEvent} farmhand.priceEvent */
import { itemsMap } from '../data/maps'
import { itemsMap } from '../data/maps.js'

import { randomNumberService } from './services/randomNumber'
import { randomNumberService } from './services/randomNumber.js'

export const random = () => {
return randomNumberService.generateRandomNumber()
Expand Down
6 changes: 3 additions & 3 deletions src/common/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { generateValueAdjustments } from './utils'
import { generateValueAdjustments } from './utils.js'

vitest.mock('../data/maps')
vitest.mock('../data/items')
vitest.mock('../data/maps.js')
vitest.mock('../data/items.js')

describe('generateValueAdjustments', () => {
let valueAdjustments
Expand Down
20 changes: 10 additions & 10 deletions src/components/AccountingView/AccountingView.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import React, { useEffect, useState, forwardRef } from 'react'
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
import Button from '@mui/material/Button'
import TextField from '@mui/material/TextField'
import AccountBalanceIcon from '@mui/icons-material/AccountBalance'
import Card from '@mui/material/Card/index.js'
import CardHeader from '@mui/material/CardHeader/index.js'
import CardContent from '@mui/material/CardContent/index.js'
import Button from '@mui/material/Button/index.js'
import TextField from '@mui/material/TextField/index.js'
import AccountBalanceIcon from '@mui/icons-material/AccountBalance.js'
import NumberFormat from 'react-number-format'
import { func, number } from 'prop-types'

import FarmhandContext from '../Farmhand/Farmhand.context'
import { moneyString } from '../../utils/moneyString'
import { dollarString, moneyTotal } from '../../utils'
import FarmhandContext from '../Farmhand/Farmhand.context.js'
import { moneyString } from '../../utils/moneyString.js'
import { dollarString, moneyTotal } from '../../utils/index.js'
import {
STANDARD_LOAN_AMOUNT,
LOAN_INTEREST_RATE,
LOAN_GARNISHMENT_RATE,
} from '../../constants'
} from '../../constants.js'

import './AccountingView.sass'

Expand Down
6 changes: 3 additions & 3 deletions src/components/AccountingView/AccountingView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'

import FarmhandContext from '../Farmhand/Farmhand.context'
import FarmhandContext from '../Farmhand/Farmhand.context.js'

import { STANDARD_LOAN_AMOUNT } from '../../constants'
import { STANDARD_LOAN_AMOUNT } from '../../constants.js'

import AccountingView from './AccountingView'
import AccountingView from './AccountingView.js'

describe('<AccountView />', () => {
let handleClickLoanPaydownButton, handleClickTakeOutLoanButton
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountingView/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './AccountingView'
export { default } from './AccountingView.js'
12 changes: 6 additions & 6 deletions src/components/Achievement/Achievement.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import classNames from 'classnames'

import AssignmentLateIcon from '@mui/icons-material/AssignmentLate'
import Card from '@mui/material/Card'
import CardHeader from '@mui/material/CardHeader'
import CardContent from '@mui/material/CardContent'
import BeenhereIcon from '@mui/icons-material/Beenhere'
import AssignmentLateIcon from '@mui/icons-material/AssignmentLate.js'
import Card from '@mui/material/Card/index.js'
import CardHeader from '@mui/material/CardHeader/index.js'
import CardContent from '@mui/material/CardContent/index.js'
import BeenhereIcon from '@mui/icons-material/Beenhere.js'
import { bool, object, shape, string } from 'prop-types'

import FarmhandContext from '../Farmhand/Farmhand.context'
import FarmhandContext from '../Farmhand/Farmhand.context.js'

import './Achievement.sass'

Expand Down
4 changes: 2 additions & 2 deletions src/components/Achievement/Achievement.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import { render, screen } from '@testing-library/react'

import FarmhandContext from '../Farmhand/Farmhand.context'
import FarmhandContext from '../Farmhand/Farmhand.context.js'

import Achievement from './Achievement'
import Achievement from './Achievement.js'

describe('<Achievement />', () => {
let achievementObject
Expand Down
2 changes: 1 addition & 1 deletion src/components/Achievement/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './Achievement'
export { default } from './Achievement.js'
18 changes: 9 additions & 9 deletions src/components/AchievementsView/AchievementsView.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react'
import Accordion from '@mui/material/Accordion'
import AccordionSummary from '@mui/material/AccordionSummary'
import AccordionDetails from '@mui/material/AccordionDetails'
import Accordion from '@mui/material/Accordion/index.js'
import AccordionSummary from '@mui/material/AccordionSummary/index.js'
import AccordionDetails from '@mui/material/AccordionDetails/index.js'
import { object } from 'prop-types'
import Divider from '@mui/material/Divider'
import Divider from '@mui/material/Divider/index.js'

import FarmhandContext from '../Farmhand/Farmhand.context'
import ProgressBar from '../ProgressBar'
import Achievement from '../Achievement'
import achievements from '../../data/achievements'
import { memoize } from '../../utils/memoize'
import FarmhandContext from '../Farmhand/Farmhand.context.js'
import ProgressBar from '../ProgressBar/index.js'
import Achievement from '../Achievement/index.js'
import achievements from '../../data/achievements.js'
import { memoize } from '../../utils/memoize.js'

import './AchievementsView.sass'

Expand Down
2 changes: 1 addition & 1 deletion src/components/AchievementsView/AchievementsView.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { shallow } from 'enzyme'

import AchievementsView from './AchievementsView'
import AchievementsView from './AchievementsView.js'

let component

Expand Down
2 changes: 1 addition & 1 deletion src/components/AchievementsView/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './AchievementsView'
export { default } from './AchievementsView.js'
2 changes: 1 addition & 1 deletion src/components/AnimatedNumber/AnimatedNumber.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { shallow } from 'enzyme'

import AnimatedNumber from './AnimatedNumber'
import AnimatedNumber from './AnimatedNumber.js'

let component

Expand Down
2 changes: 1 addition & 1 deletion src/components/AnimatedNumber/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './AnimatedNumber'
export { default } from './AnimatedNumber.js'
12 changes: 6 additions & 6 deletions src/components/AppBar/AppBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import React, { useEffect, useState } from 'react'
import { tween } from 'shifty'
import { array, bool, func, number, string } from 'prop-types'

import { default as MuiAppBar } from '@mui/material/AppBar'
import Toolbar from '@mui/material/Toolbar'
import Typography from '@mui/material/Typography'
import StepIcon from '@mui/material/StepIcon'
import { default as MuiAppBar } from '@mui/material/AppBar/index.js'
import Toolbar from '@mui/material/Toolbar/index.js'
import Typography from '@mui/material/Typography/index.js'
import StepIcon from '@mui/material/StepIcon/index.js'

import FarmhandContext from '../Farmhand/Farmhand.context'
import { moneyString } from '../../utils/moneyString'
import FarmhandContext from '../Farmhand/Farmhand.context.js'
import { moneyString } from '../../utils/moneyString.js'
import './AppBar.sass'

const MoneyDisplay = ({ money }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppBar/AppBar.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import { shallow } from 'enzyme'

import { noop } from '../../utils/noop'
import { noop } from '../../utils/noop.js'

import AppBar from './AppBar'
import AppBar from './AppBar.js'

let component

Expand Down
2 changes: 1 addition & 1 deletion src/components/AppBar/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './AppBar'
export { default } from './AppBar.js'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { shallow } from 'enzyme'

import BailOutErrorBoundary from './BailOutErrorBoundary'
import BailOutErrorBoundary from './BailOutErrorBoundary.js'

let component

Expand Down
2 changes: 1 addition & 1 deletion src/components/BailOutErrorBoundary/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './BailOutErrorBoundary'
export { default } from './BailOutErrorBoundary.js'
12 changes: 6 additions & 6 deletions src/components/Cellar/Cellar.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState } from 'react'
import Tab from '@mui/material/Tab'
import Tabs from '@mui/material/Tabs'
import Tab from '@mui/material/Tab/index.js'
import Tabs from '@mui/material/Tabs/index.js'

import { CellarInventoryTabPanel } from './CellarInventoryTabPanel'
import { FermentationTabPanel } from './FermentationTabPanel'
import { WinemakingTabPanel } from './WinemakingTabPanel'
import { a11yProps } from './TabPanel'
import { CellarInventoryTabPanel } from './CellarInventoryTabPanel.js'
import { FermentationTabPanel } from './FermentationTabPanel.js'
import { WinemakingTabPanel } from './WinemakingTabPanel.js'
import { a11yProps } from './TabPanel/index.js'

import './Cellar.sass'

Expand Down
16 changes: 8 additions & 8 deletions src/components/Cellar/CellarInventoryTabPanel.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/** @typedef {import("../../index").farmhand.keg} keg */
import React, { useContext } from 'react'
import { number } from 'prop-types'
import Divider from '@mui/material/Divider'
import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import Divider from '@mui/material/Divider/index.js'
import Card from '@mui/material/Card/index.js'
import CardContent from '@mui/material/CardContent/index.js'
import ReactMarkdown from 'react-markdown'

import FarmhandContext from '../Farmhand/Farmhand.context'
import FarmhandContext from '../Farmhand/Farmhand.context.js'
import {
KEG_INTEREST_RATE,
PURCHASEABLE_CELLARS,
WINE_GROWTH_TIMELINE_CAP,
WINE_INTEREST_RATE,
} from '../../constants'
} from '../../constants.js'

import { integerString } from '../../utils'
import { integerString } from '../../utils/index.js'

import { TabPanel } from './TabPanel'
import { Keg } from './Keg'
import { TabPanel } from './TabPanel/index.js'
import { Keg } from './Keg.js'

/**
* @param {Object} props
Expand Down
10 changes: 5 additions & 5 deletions src/components/Cellar/FermentationTabPanel.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react'
import { number } from 'prop-types'
import Divider from '@mui/material/Divider'
import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import Divider from '@mui/material/Divider/index.js'
import Card from '@mui/material/Card/index.js'
import CardContent from '@mui/material/CardContent/index.js'
import ReactMarkdown from 'react-markdown'

import { FermentationRecipeList } from '../FermentationRecipeList/FermentationRecipeList'
import { FermentationRecipeList } from '../FermentationRecipeList/FermentationRecipeList.js'

import { TabPanel } from './TabPanel'
import { TabPanel } from './TabPanel/index.js'

export const FermentationTabPanel = ({ index, currentTab }) => (
<TabPanel value={currentTab} index={index}>
Expand Down
Loading

0 comments on commit e3b8fc4

Please sign in to comment.