Skip to content

Commit

Permalink
named export instead of default export
Browse files Browse the repository at this point in the history
  • Loading branch information
ckuijjer committed Apr 9, 2024
1 parent 320bd06 commit 5f44236
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion cloud/scrapers/filmhuisdenhaag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DateTime } from 'luxon'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
2 changes: 1 addition & 1 deletion cloud/scrapers/filmhuislumen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'

const logger = parentLogger.createChild({
Expand Down
2 changes: 1 addition & 1 deletion cloud/scrapers/filmkoepel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Screening } from 'types'
import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { monthToNumber } from './utils/monthToNumber'

const logger = parentLogger.createChild({
Expand Down
2 changes: 1 addition & 1 deletion cloud/scrapers/forumgroningen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { fullMonthToNumberEnglish } from './utils/monthToNumber'

const logger = parentLogger.createChild({
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/hartlooper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { fullMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
2 changes: 1 addition & 1 deletion cloud/scrapers/ketelhuis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
fullMonthToNumberDutch,
shortMonthToNumberDutch,
} from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/lab111.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import xRayPuppeteer from '../xRayPuppeteer'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/lantarenvenster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/lumiere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import xRayPuppeteer from '../xRayPuppeteer'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/lux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { Screening } from 'types'
import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { fullMonthToNumberEnglish } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/natlab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Screening } from 'types'
import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/rialto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { Screening } from 'types'
import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { fullMonthToNumberEnglish } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/schuur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import xRayPuppeteer from '../xRayPuppeteer'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/slachtstraat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { fullMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/springhaver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { fullMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
4 changes: 2 additions & 2 deletions cloud/scrapers/studiok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import { Screening } from '../types'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberDutch } from './utils/monthToNumber'
import splitTime from './utils/splitTime'
import { splitTime } from './utils/splitTime'

const logger = parentLogger.createChild({
persistentLogAttributes: {
Expand Down
2 changes: 1 addition & 1 deletion cloud/scrapers/themovies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Screening } from 'types'
import Xray from 'x-ray'

import { logger as parentLogger } from '../powertools'
import guessYear from './utils/guessYear'
import { guessYear } from './utils/guessYear'
import { shortMonthToNumberEnglish } from './utils/monthToNumber'

const logger = parentLogger.createChild({
Expand Down
4 changes: 1 addition & 3 deletions cloud/scrapers/utils/guessYear.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DateObjectUnits, DateTime } from 'luxon'

// if the date is over half a year in the past, it's likely one belonging to next year
const guessYear = (dateObjects: DateObjectUnits) => {
export const guessYear = (dateObjects: DateObjectUnits) => {
const now = DateTime.local()

let date = DateTime.fromObject(dateObjects)
Expand All @@ -17,5 +17,3 @@ const guessYear = (dateObjects: DateObjectUnits) => {
return date.year
}
}

export default guessYear
3 changes: 3 additions & 0 deletions cloud/scrapers/utils/monthToNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const monthToNumberWithWarning = (

return monthNumber
}

export function fullMonthToNumberDutch(month: string) {
return monthToNumberWithWarning(
'fullMonthToNumberDutch',
Expand All @@ -105,13 +106,15 @@ export function shortMonthToNumberDutch(month: string) {
month,
)
}

export function fullMonthToNumberEnglish(month: string) {
return monthToNumberWithWarning(
'fullMonthToNumberEnglish',
FULL_MONTHS_ENGLISH,
month,
)
}

export function shortMonthToNumberEnglish(month: string) {
return monthToNumberWithWarning(
'shortMonthToNumberEnglish',
Expand Down
5 changes: 2 additions & 3 deletions cloud/scrapers/utils/splitTime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// : or . as separator
const splitTime = (time: string) => time.split(/:|\./).map((x) => Number(x))

export default splitTime
export const splitTime = (time: string) =>
time.split(/:|\./).map((x) => Number(x))

0 comments on commit 5f44236

Please sign in to comment.