react-open-weather
Advanced tools
Comparing version
@@ -1,16 +0,1 @@ | ||
/** | ||
* A better abstraction over CSS. | ||
* | ||
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present | ||
* @website https://github.com/cssinjs/jss | ||
* @license MIT | ||
*/ | ||
/** @license React v16.11.0 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ |
{ | ||
"name": "react-open-weather", | ||
"bin": {}, | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "React Weather component", | ||
@@ -11,10 +11,10 @@ "main": "lib/ReactWeather.js", | ||
"peerDependencies": { | ||
"react": ">=16.14.0", | ||
"react-dom": ">=16.14.0" | ||
"react": ">=17.0.1", | ||
"react-dom": ">=17.0.1" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.21.0", | ||
"@emotion/styled": "^11.10.0", | ||
"axios": "^0.27.2", | ||
"dayjs": "^1.9.6", | ||
"prop-types": "^15.7.2", | ||
"react-jss": "^10.5.0" | ||
"prop-types": "^15.7.2" | ||
}, | ||
@@ -29,18 +29,17 @@ "devDependencies": { | ||
"@babel/runtime": "^7.12.5", | ||
"@testing-library/react-hooks": "^3.4.2", | ||
"@testing-library/react-hooks": "^8.0.1", | ||
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7", | ||
"autoprefixer-loader": "^3.2.0", | ||
"axios-mock-adapter": "^1.19.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^26.6.3", | ||
"babel-jest": "^28.1.3", | ||
"babel-loader": "^8.2.2", | ||
"check-snapshot": "^0.4.0", | ||
"coveralls": "^3.1.0", | ||
"enzyme": "^3.11.0", | ||
"enzyme-adapter-react-16": "^1.15.5", | ||
"eslint": "^7.14.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-prettier": "^6.15.0", | ||
"eslint": "^8.21.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.21.5", | ||
@@ -50,12 +49,10 @@ "file-loader": "^6.2.0", | ||
"ignore-styles": "^5.0.1", | ||
"jest": "^26.6.3", | ||
"jest-watch-typeahead": "^0.6.1", | ||
"jsdom": "^16.4.0", | ||
"mocha": "^8.2.1", | ||
"jest": "^28.1.3", | ||
"jest-watch-typeahead": "^2.0.0", | ||
"jsdom": "^20.0.0", | ||
"mockdate": "^3.0.2", | ||
"np": "^7.0.0", | ||
"prettier": "^2.2.0", | ||
"react": "^16.14.0", | ||
"react-addons-test-utils": "^15.6.2", | ||
"react-dom": "^16.14.0", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"react-hot-loader": "^4.13.0", | ||
@@ -65,12 +62,11 @@ "react-test-renderer": "^17.0.1", | ||
"webpack-cli": "^4.2.0", | ||
"webpack-dev-server": "^3.11.0" | ||
"webpack-dev-server": "^4.9.3" | ||
}, | ||
"scripts": { | ||
"build": "./node_modules/webpack/bin/webpack.js --config webpack.config.build.js", | ||
"start": "webpack serve --config webpack.config.dev.js --mode development", | ||
"start": "webpack serve --config webpack.config.dev.js --mode development --port 5000", | ||
"test": "./node_modules/.bin/jest", | ||
"test-dev": "./node_modules/.bin/jest --watch", | ||
"lint": "./node_modules/.bin/eslint ./src/js ;exit 0", | ||
"coverage": "./node_modules/.bin/jest --coverage", | ||
"release": "np" | ||
"coverage": "./node_modules/.bin/jest --coverage" | ||
}, | ||
@@ -77,0 +73,0 @@ "repository": { |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import WeatherIcon from './WeatherIcon'; | ||
import useStyles from './Forecast.styles'; | ||
import { StyledDaysPanel } from './Forecast.styles'; | ||
const Forecast = ({ unitsLabels, forecast, theme }) => { | ||
const classes = useStyles({ theme }); | ||
return ( | ||
<div className={classes.daysPanel}> | ||
<StyledDaysPanel className="rw-forecast-days-panel" theme={theme}> | ||
{forecast.map((day, i) => { | ||
if (i > 0) { | ||
return ( | ||
<div key={day.date} className={classes.day}> | ||
<div className={classes.date}>{day.date}</div> | ||
<div className={classes.icon}> | ||
<div key={day.date} className="rw-forecast-day"> | ||
<div className="rw-forecast-date">{day.date}</div> | ||
<div className="rw-forecast-icon"> | ||
<WeatherIcon | ||
@@ -22,4 +21,4 @@ path={day.icon} | ||
</div> | ||
<div className={classes.desc}>{day.description}</div> | ||
<div className={classes.range}> | ||
<div className="rw-forecast-desc">{day.description}</div> | ||
<div className="rw-forecast-range"> | ||
{day.temperature.max} / {day.temperature.min}{' '} | ||
@@ -33,3 +32,3 @@ {unitsLabels.temperature} | ||
})} | ||
</div> | ||
</StyledDaysPanel> | ||
); | ||
@@ -36,0 +35,0 @@ }; |
@@ -1,48 +0,45 @@ | ||
import { createUseStyles } from 'react-jss'; | ||
import styled from '@emotion/styled'; | ||
const useStyles = createUseStyles({ | ||
daysPanel: { | ||
clear: 'both', | ||
display: 'flex', | ||
borderLeft: ({ theme }) => `solid 1px #${theme.forecastBackgroundColor}`, | ||
borderRight: ({ theme }) => `solid 1px #${theme.forecastBackgroundColor}`, | ||
borderBottom: ({ theme }) => `solid 1px #${theme.forecastBackgroundColor}`, | ||
borderRadius: '0 0 5px 5px', | ||
fontSize: 11, | ||
backgroundColor: ({ theme }) => theme.forecastBackgroundColor, | ||
composes: 'rw-forecast-days-panel', | ||
}, | ||
day: { | ||
width: '25%', | ||
textAlign: 'center', | ||
margin: '10px 0', | ||
padding: '0 10px', | ||
'&:not(:first-child)': { | ||
borderLeft: ({ theme }) => `solid 1px ${theme.forecastSeparatorColor}`, | ||
export const StyledDaysPanel = styled.div` | ||
clear: both; | ||
display: flex; | ||
border-left: ${({ theme }) => `solid 1px ${theme.forecastBackgroundColor}`}; | ||
border-right: ${({ theme }) => `solid 1px ${theme.forecastBackgroundColor}`}; | ||
border-bottom: ${({ theme }) => `solid 1px ${theme.forecastBackgroundColor}`}; | ||
border-radius: 0 0 5px 5px; | ||
font-size: 11px; | ||
background-color: ${({ theme }) => theme.forecastBackgroundColor}; | ||
.rw-forecast-day{ | ||
width: 25%; | ||
text-align: center; | ||
margin: 10px 0; | ||
padding: 0 10px; | ||
'&:not(:first-of-type)': { | ||
border-left: ${({ theme }) => | ||
`solid 1px ${theme.forecastSeparatorColor}`}, | ||
}, | ||
composes: 'rw-forecast-day', | ||
}, | ||
date: { | ||
color: ({ theme }) => theme.forecastDateColor, | ||
fontSize: 11, | ||
fontWeight: 'bold', | ||
composes: 'rw-forecast-date', | ||
}, | ||
desc: { | ||
color: ({ theme }) => theme.forecastDescColor, | ||
margin: [10, 0, 10, 0], | ||
fontSize: 12, | ||
composes: 'rw-forecast-desc', | ||
}, | ||
range: { | ||
color: ({ theme }) => theme.forecastRangeColor, | ||
fontSize: 11, | ||
composes: 'rw-forecast-range', | ||
}, | ||
icon: { | ||
paddingTop: 10, | ||
composes: 'rw-forecast-icon', | ||
}, | ||
}); | ||
} | ||
export default useStyles; | ||
.rw-forecast-date{ | ||
color: ${({ theme }) => theme.forecastDateColor}; | ||
font-size: 11px; | ||
font-weight: bold; | ||
} | ||
.rw-forecast-desc{ | ||
color: ${({ theme }) => theme.forecastDescColor}; | ||
margin: 10px 0 10px 0; | ||
font-size: 12px; | ||
} | ||
.rw-forecast-range{ | ||
color: ${({ theme }) => theme.forecastRangeColor}; | ||
font-size: 11px; | ||
} | ||
.rw-forecast-icon{ | ||
padding-top:10px; | ||
} | ||
`; |
@@ -6,3 +6,3 @@ import React from 'react'; | ||
import WeatherIcon from './WeatherIcon'; | ||
import useStyles from './ReactWeather.styles'; | ||
import { StyledContainer } from './ReactWeather.styles'; | ||
import defaultTheme from '../defaultTheme'; | ||
@@ -20,3 +20,2 @@ | ||
}) => { | ||
const classes = useStyles({ showForecast, theme }); | ||
if (data) { | ||
@@ -31,6 +30,6 @@ const { forecast, current } = data; | ||
return ( | ||
<div className={classes.container}> | ||
<div className={classes.main}> | ||
<div className={classes.left}> | ||
<h2 className={classes.header}>{locationLabel}</h2> | ||
<StyledContainer className="rw-container" theme={theme}> | ||
<div className="rw-container-main"> | ||
<div className="rw-container-left"> | ||
<h2 className="rw-container-header">{locationLabel}</h2> | ||
<Today | ||
@@ -43,3 +42,3 @@ current={current} | ||
</div> | ||
<div className={classes.right}> | ||
<div className="rw-container-right"> | ||
<WeatherIcon | ||
@@ -61,3 +60,3 @@ path={current.icon} | ||
)} | ||
</div> | ||
</StyledContainer> | ||
); | ||
@@ -64,0 +63,0 @@ } |
@@ -1,43 +0,39 @@ | ||
import { createUseStyles } from 'react-jss'; | ||
import styled from '@emotion/styled'; | ||
const useStyles = createUseStyles({ | ||
container: { | ||
fontFamily: ({ theme }) => theme.fontFamily, | ||
fontSize: 13, | ||
boxShadow: ({ theme }) => theme.containerDropShadow, | ||
borderRadius: '0 0 5px 5px', | ||
composes: 'rw-container', | ||
}, | ||
main: { | ||
color: ({ theme }) => theme.locationFontColor, | ||
width: '100%', | ||
height: '100%', | ||
background: ({ theme }) => | ||
`linear-gradient(to bottom right, ${theme.gradientStart}, ${theme.gradientMid}, ${theme.gradientEnd})`, | ||
display: 'flex', | ||
borderRadius: ({ showForecast }) => (showForecast ? [[5, 5, 0, 0]] : 5), | ||
composes: 'rw-container-main', | ||
}, | ||
header: { | ||
margin: [0, 0, 10, 0], | ||
fontWeight: '300', | ||
fontSize: 'x-large', | ||
letterSpacing: 2, | ||
composes: 'rw-container-header', | ||
}, | ||
left: { | ||
padding: 25, | ||
width: '60%', | ||
composes: 'rw-container-left', | ||
}, | ||
right: { | ||
backgroundColor: 'rgba(0,0,0,0.1)', | ||
width: '40%', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
composes: 'rw-container-right', | ||
}, | ||
}); | ||
export const StyledContainer = styled.div` | ||
font-family: ${({ theme }) => theme.fontFamily}; | ||
font-size: 13px; | ||
box-shadow: ${({ theme }) => theme.containerDropShadow}; | ||
border-radius: 0 0 5px 5px; | ||
export default useStyles; | ||
.rw-container-main { | ||
color: ${({ theme }) => theme.locationFontColor}; | ||
height: 100%; | ||
width: 100%; | ||
background: ${({ theme }) => | ||
`linear-gradient(to bottom right, ${theme.gradientStart}, ${theme.gradientMid}, ${theme.gradientEnd})`}; | ||
display: flex; | ||
border-radius: ${({ showForecast }) => | ||
showForecast ? '5px 5px 0 0' : '5px'}; | ||
} | ||
.rw-container-header { | ||
margin: 0 0 10px 0; | ||
font-weight: 300; | ||
font-size: x-large; | ||
letter-spacing: 2px; | ||
} | ||
.rw-container-left { | ||
padding: 25px; | ||
width: 60%; | ||
} | ||
.rw-container-right { | ||
background-color: rgba(0, 0, 0, 0.1); | ||
width: 40%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
`; |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getLabelsByLanguage } from '../utils'; | ||
import useStyles from './Today.styles'; | ||
import { StyledtodayPanel } from './Today.styles'; | ||
const Today = ({ current, unitsLabels, lang, theme }) => { | ||
const classes = useStyles({ theme }); | ||
const labels = getLabelsByLanguage(lang); | ||
@@ -13,10 +12,10 @@ const hasRange = | ||
return ( | ||
<div className="rw-today"> | ||
<div className={classes.date}>{current.date}</div> | ||
<div className={classes.hr} /> | ||
<div className={classes.current}> | ||
<StyledtodayPanel className="rw-today" theme={theme}> | ||
<div className="rw-today-date">{current.date}</div> | ||
<div className="rw-today-hr" /> | ||
<div className="rw-today-current"> | ||
{current.temperature.current} {unitsLabels.temperature} | ||
</div> | ||
{hasRange && ( | ||
<div className={classes.range}> | ||
<div className="rw-today-range"> | ||
{current.temperature.max} / {current.temperature.min}{' '} | ||
@@ -26,5 +25,5 @@ {unitsLabels.temperature} | ||
)} | ||
<div className={classes.desc}>{current.description}</div> | ||
<div className={classes.hr} /> | ||
<div className={classes.info}> | ||
<div className="rw-today-desc">{current.description}</div> | ||
<div className="rw-today-hr" /> | ||
<div className="rw-today-info"> | ||
<div> | ||
@@ -37,3 +36,3 @@ {labels.wind}: <b>{current.wind}</b> {unitsLabels.windSpeed} | ||
</div> | ||
</div> | ||
</StyledtodayPanel> | ||
); | ||
@@ -40,0 +39,0 @@ }; |
@@ -1,41 +0,39 @@ | ||
import { createUseStyles } from 'react-jss'; | ||
import styled from '@emotion/styled'; | ||
const useStyles = createUseStyles({ | ||
date: { | ||
color: ({ theme }) => theme.todayDateFontColor, | ||
composes: 'rw-today-date', | ||
}, | ||
current: { | ||
fontSize: 45, | ||
color: ({ theme }) => theme.todayTempFontColor, | ||
composes: 'rw-today-current', | ||
}, | ||
range: { | ||
color: ({ theme }) => theme.todayRangeFontColor, | ||
fontSize: 12, | ||
margin: [0, 0, 5, 2], | ||
composes: 'rw-today-range', | ||
}, | ||
desc: { | ||
color: ({ theme }) => theme.todayDescFontColor, | ||
fontSize: 16, | ||
composes: 'rw-today-desc', | ||
}, | ||
info: { | ||
color: ({ theme }) => theme.todayInfoFontColor, | ||
'& div': { | ||
marginBottom: 5, | ||
}, | ||
composes: 'rw-today-info', | ||
}, | ||
hr: { | ||
width: '100%', | ||
height: 0, | ||
borderBottom: 'solid 1px #fff', | ||
opacity: '0.4', | ||
margin: [10, 0], | ||
composes: 'rw-today-hr', | ||
}, | ||
}); | ||
export const StyledtodayPanel = styled.div` | ||
.rw-today-date { | ||
color: ${({ theme }) => theme.todayDateFontColor}; | ||
} | ||
export default useStyles; | ||
.rw-today-current { | ||
font-size: 45px; | ||
color: ${({ theme }) => theme.todayTempFontColor}; | ||
} | ||
.rw-today-range { | ||
color: ${({ theme }) => theme.todayRangeFontColor}; | ||
font-size: 12px; | ||
margin: 0 0 5px 2px; | ||
} | ||
.rw-today-desc { | ||
color: ${({ theme }) => theme.todayDescFontColor}; | ||
font-size: 16px; | ||
} | ||
.rw-today-info { | ||
color: ${({ theme }) => theme.todayInfoFontColor}; | ||
} | ||
.rw-today-info div { | ||
margin-bottom: 5px; | ||
} | ||
.rw-today-hr { | ||
width: 100%; | ||
height: 0; | ||
border-bottom: solid 1px #fff; | ||
opacity: 0.4; | ||
margin: 10px 0px; | ||
} | ||
`; |
import React from 'react'; | ||
import { createUseStyles } from 'react-jss'; | ||
import styled from '@emotion/styled'; | ||
import PropTypes from 'prop-types'; | ||
const useStyles = createUseStyles({ | ||
svg: { | ||
fill: ({ color }) => color, | ||
}, | ||
}); | ||
const StyledSVG = styled.svg` | ||
fill: ${({ color }) => color}; | ||
`; | ||
// eslint-disable-next-line no-unused-vars | ||
const WeatherIcon = ({ title, path, size, viewBox, color }) => { | ||
const classes = useStyles({ color }); | ||
return ( | ||
<svg | ||
<StyledSVG | ||
color={color} | ||
version="1.1" | ||
@@ -21,7 +19,6 @@ xmlns="http://www.w3.org/2000/svg" | ||
viewBox={viewBox} | ||
className={classes.svg} | ||
> | ||
<title>{title}</title> | ||
<path d={path} /> | ||
</svg> | ||
</StyledSVG> | ||
); | ||
@@ -28,0 +25,0 @@ }; |
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import ReactWeather, { useVisualCrossing, useOpenWeather, useWeatherBit } from '.'; | ||
import ReactWeather, { | ||
useVisualCrossing, | ||
useOpenWeather, | ||
useWeatherBit, | ||
} from '.'; | ||
const App = () => { | ||
const { data, isLoading, errorMessage } = useVisualCrossing({ | ||
// const { data, isLoading, errorMessage } = useVisualCrossing({ | ||
// key: 'YOUR_API_KEY', | ||
// lat: '48.137154', | ||
// lon: '11.576124', | ||
// lang: 'en', | ||
// unit: 'metric', | ||
// }); | ||
const { data, isLoading, errorMessage } = useOpenWeather({ | ||
key: 'YOUR_API_KEY', | ||
@@ -13,10 +25,2 @@ lat: '48.137154', | ||
}); | ||
//const { data, isLoading, errorMessage } = useOpenWeather({ | ||
// key: 'YOUR_API_KEY', | ||
// lat: '48.137154', | ||
// lon: '11.576124', | ||
// lang: 'en', | ||
// unit: 'metric', | ||
//}); | ||
// const { data, isLoading, errorMessage } = useWeatherBit({ | ||
@@ -23,0 +27,0 @@ // lat: '48.137154', |
@@ -39,2 +39,3 @@ import { useEffect, useReducer, useState } from 'react'; | ||
export const mapCurrent = (day, current, lang) => { | ||
console.log('HERE', current); | ||
return { | ||
@@ -41,0 +42,0 @@ date: formatDate(day.datetime, lang), |
export const mappedCurrent = { | ||
"date": "Wed 23 March", | ||
"description": "Clear conditions throughout the day.", | ||
"humidity": 24.3, | ||
"icon": "M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z", | ||
"temperature": { | ||
"current": "18", | ||
"max": "18", | ||
"min": "-3" | ||
}, | ||
"wind": "5" | ||
date: 'Wed 23 March', | ||
description: 'Clear conditions throughout the day.', | ||
humidity: 24.3, | ||
icon: | ||
'M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z', | ||
temperature: { | ||
current: '18', | ||
max: '18', | ||
min: '-3', | ||
}, | ||
wind: '5', | ||
}; |
@@ -1,228 +0,231 @@ | ||
export const apiForecastResponse = | ||
{ | ||
"queryCost": 1, | ||
"latitude": 48.137154, | ||
"longitude": 11.576124, | ||
"resolvedAddress": "48.137154,11.576124", | ||
"address": "48.137154,11.576124", | ||
"timezone": "Europe/Berlin", | ||
"tzoffset": 1.0, | ||
"days": [ | ||
{ | ||
"datetimeEpoch": 1648076400, | ||
"tempmax": 18.3, | ||
"tempmin": -2.7, | ||
"temp": 8.3, | ||
"humidity": 52.7, | ||
"windspeed": 11.9, | ||
"description": "Clear conditions throughout the day.", | ||
"icon": "clear-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648162800, | ||
"tempmax": 16.7, | ||
"tempmin": 2.0, | ||
"temp": 9.8, | ||
"humidity": 53.9, | ||
"windspeed": 10.1, | ||
"description": "Clear conditions throughout the day.", | ||
"icon": "clear-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648249200, | ||
"tempmax": 16.7, | ||
"tempmin": 3.5, | ||
"temp": 9.5, | ||
"humidity": 55.5, | ||
"windspeed": 15.1, | ||
"description": "Clear conditions throughout the day.", | ||
"icon": "clear-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648335600, | ||
"tempmax": 17.4, | ||
"tempmin": 3.5, | ||
"temp": 10.0, | ||
"humidity": 54.3, | ||
"windspeed": 12.6, | ||
"description": "Clear conditions throughout the day.", | ||
"icon": "clear-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648418400, | ||
"tempmax": 17.7, | ||
"tempmin": 3.4, | ||
"temp": 11.3, | ||
"humidity": 55.9, | ||
"windspeed": 11.5, | ||
"description": "Clear conditions throughout the day.", | ||
"icon": "clear-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648504800, | ||
"tempmax": 17.0, | ||
"tempmin": 6.6, | ||
"temp": 11.7, | ||
"humidity": 57.5, | ||
"windspeed": 8.3, | ||
"description": "Partly cloudy throughout the day.", | ||
"icon": "partly-cloudy-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648591200, | ||
"tempmax": 14.7, | ||
"tempmin": 8.4, | ||
"temp": 10.8, | ||
"humidity": 67.5, | ||
"windspeed": 17.3, | ||
"description": "Cloudy skies throughout the day.", | ||
"icon": "cloudy" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648677600, | ||
"tempmax": 9.5, | ||
"tempmin": 5.9, | ||
"temp": 8.4, | ||
"humidity": 88.6, | ||
"windspeed": 12.2, | ||
"description": "Cloudy skies throughout the day with afternoon rain.", | ||
"icon": "rain" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648764000, | ||
"tempmax": 5.9, | ||
"tempmin": 3.9, | ||
"temp": 4.9, | ||
"humidity": 88.3, | ||
"windspeed": 12.6, | ||
"description": "Cloudy skies throughout the day.", | ||
"icon": "cloudy" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648850400, | ||
"tempmax": 9.5, | ||
"tempmin": 4.8, | ||
"temp": 7.4, | ||
"humidity": 84.6, | ||
"windspeed": 32.0, | ||
"description": "Cloudy skies throughout the day.", | ||
"icon": "wind" | ||
}, | ||
{ | ||
"datetimeEpoch": 1648936800, | ||
"tempmax": 11.1, | ||
"tempmin": 5.4, | ||
"temp": 8.0, | ||
"humidity": 84.9, | ||
"windspeed": 24.1, | ||
"description": "Cloudy skies throughout the day.", | ||
"icon": "cloudy" | ||
}, | ||
{ | ||
"datetimeEpoch": 1649023200, | ||
"tempmax": 18.9, | ||
"tempmin": 8.9, | ||
"temp": 12.9, | ||
"humidity": 77.4, | ||
"windspeed": 12.8, | ||
"description": "Cloudy skies throughout the day.", | ||
"icon": "cloudy" | ||
}, | ||
{ | ||
"datetimeEpoch": 1649109600, | ||
"tempmax": 20.9, | ||
"tempmin": 7.9, | ||
"temp": 12.7, | ||
"humidity": 69.9, | ||
"windspeed": 34.6, | ||
"description": "Partly cloudy throughout the day.", | ||
"icon": "wind" | ||
}, | ||
{ | ||
"datetimeEpoch": 1649196000, | ||
"tempmax": 14.1, | ||
"tempmin": 7.3, | ||
"temp": 10.3, | ||
"humidity": 64.8, | ||
"windspeed": 26.3, | ||
"description": "Becoming cloudy in the afternoon.", | ||
"icon": "partly-cloudy-day" | ||
}, | ||
{ | ||
"datetimeEpoch": 1649282400, | ||
"tempmax": 17.1, | ||
"tempmin": 6.4, | ||
"temp": 11.4, | ||
"humidity": 65.8, | ||
"windspeed": 30.2, | ||
"description": "Partly cloudy throughout the day.", | ||
"icon": "wind" | ||
} | ||
], | ||
"currentConditions": { | ||
"datetimeEpoch": 1648135773, | ||
"temp": 18.3, | ||
"humidity": 24.3, | ||
"windspeed": 5.4, | ||
"icon": "clear-day" | ||
} | ||
export const apiForecastResponse = { | ||
queryCost: 1, | ||
latitude: 48.137154, | ||
longitude: 11.576124, | ||
resolvedAddress: '48.137154,11.576124', | ||
address: '48.137154,11.576124', | ||
timezone: 'Europe/Berlin', | ||
tzoffset: 1.0, | ||
days: [ | ||
{ | ||
datetimeEpoch: 1648075400, | ||
tempmax: 18.3, | ||
tempmin: -2.7, | ||
temp: 8.3, | ||
humidity: 52.7, | ||
windspeed: 11.9, | ||
description: 'Clear conditions throughout the day.', | ||
icon: 'clear-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1648161800, | ||
tempmax: 16.7, | ||
tempmin: 2.0, | ||
temp: 9.8, | ||
humidity: 53.9, | ||
windspeed: 10.1, | ||
description: 'Clear conditions throughout the day.', | ||
icon: 'clear-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1648248200, | ||
tempmax: 16.7, | ||
tempmin: 3.5, | ||
temp: 9.5, | ||
humidity: 55.5, | ||
windspeed: 15.1, | ||
description: 'Clear conditions throughout the day.', | ||
icon: 'clear-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1648334600, | ||
tempmax: 17.4, | ||
tempmin: 3.5, | ||
temp: 10.0, | ||
humidity: 54.3, | ||
windspeed: 12.6, | ||
description: 'Clear conditions throughout the day.', | ||
icon: 'clear-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1648417400, | ||
tempmax: 17.7, | ||
tempmin: 3.4, | ||
temp: 11.3, | ||
humidity: 55.9, | ||
windspeed: 11.5, | ||
description: 'Clear conditions throughout the day.', | ||
icon: 'clear-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1648503800, | ||
tempmax: 17.0, | ||
tempmin: 6.6, | ||
temp: 11.7, | ||
humidity: 57.5, | ||
windspeed: 8.3, | ||
description: 'Partly cloudy throughout the day.', | ||
icon: 'partly-cloudy-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1648590200, | ||
tempmax: 14.7, | ||
tempmin: 8.4, | ||
temp: 10.8, | ||
humidity: 67.5, | ||
windspeed: 17.3, | ||
description: 'Cloudy skies throughout the day.', | ||
icon: 'cloudy', | ||
}, | ||
{ | ||
datetimeEpoch: 1648676600, | ||
tempmax: 9.5, | ||
tempmin: 5.9, | ||
temp: 8.4, | ||
humidity: 88.6, | ||
windspeed: 12.2, | ||
description: 'Cloudy skies throughout the day with afternoon rain.', | ||
icon: 'rain', | ||
}, | ||
{ | ||
datetimeEpoch: 1648763000, | ||
tempmax: 5.9, | ||
tempmin: 3.9, | ||
temp: 4.9, | ||
humidity: 88.3, | ||
windspeed: 12.6, | ||
description: 'Cloudy skies throughout the day.', | ||
icon: 'cloudy', | ||
}, | ||
{ | ||
datetimeEpoch: 1648851400, | ||
tempmax: 9.5, | ||
tempmin: 4.8, | ||
temp: 7.4, | ||
humidity: 84.6, | ||
windspeed: 32.0, | ||
description: 'Cloudy skies throughout the day.', | ||
icon: 'wind', | ||
}, | ||
{ | ||
datetimeEpoch: 1648935800, | ||
tempmax: 11.1, | ||
tempmin: 5.4, | ||
temp: 8.0, | ||
humidity: 84.9, | ||
windspeed: 24.1, | ||
description: 'Cloudy skies throughout the day.', | ||
icon: 'cloudy', | ||
}, | ||
{ | ||
datetimeEpoch: 1649022200, | ||
tempmax: 18.9, | ||
tempmin: 8.9, | ||
temp: 12.9, | ||
humidity: 77.4, | ||
windspeed: 12.8, | ||
description: 'Cloudy skies throughout the day.', | ||
icon: 'cloudy', | ||
}, | ||
{ | ||
datetimeEpoch: 1649108600, | ||
tempmax: 20.9, | ||
tempmin: 7.9, | ||
temp: 12.7, | ||
humidity: 69.9, | ||
windspeed: 34.6, | ||
description: 'Partly cloudy throughout the day.', | ||
icon: 'wind', | ||
}, | ||
{ | ||
datetimeEpoch: 1649195000, | ||
tempmax: 14.1, | ||
tempmin: 7.3, | ||
temp: 10.3, | ||
humidity: 64.8, | ||
windspeed: 26.3, | ||
description: 'Becoming cloudy in the afternoon.', | ||
icon: 'partly-cloudy-day', | ||
}, | ||
{ | ||
datetimeEpoch: 1649281400, | ||
tempmax: 17.1, | ||
tempmin: 6.4, | ||
temp: 11.4, | ||
humidity: 65.8, | ||
windspeed: 30.2, | ||
description: 'Partly cloudy throughout the day.', | ||
icon: 'wind', | ||
}, | ||
], | ||
currentConditions: { | ||
datetimeEpoch: 1648135773, | ||
temp: 18.3, | ||
humidity: 24.3, | ||
windspeed: 5.4, | ||
icon: 'clear-day', | ||
}, | ||
}; | ||
export const mappedForecast = [ | ||
{ | ||
"date": "Wed 23 March", | ||
"description": "Clear conditions throughout the day.", | ||
"humidity": 52.7, | ||
"icon": "M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z", | ||
"temperature": { | ||
"max": "18", | ||
"min": "-3" | ||
}, | ||
"wind": "12" | ||
}, | ||
{ | ||
"date": "Thu 24 March", | ||
"description": "Clear conditions throughout the day.", | ||
"humidity": 53.9, | ||
"icon": "M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z", | ||
"temperature": { | ||
"max": "17", | ||
"min": "2" | ||
}, | ||
"wind": "10" | ||
}, | ||
{ | ||
"date": "Fri 25 March", | ||
"description": "Clear conditions throughout the day.", | ||
"humidity": 55.5, | ||
"icon": "M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z", | ||
"temperature": { | ||
"max": "17", | ||
"min": "4" | ||
}, | ||
"wind": "15" | ||
}, | ||
{ | ||
"date": "Sat 26 March", | ||
"description": "Clear conditions throughout the day.", | ||
"humidity": 54.3, | ||
"icon": "M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z", | ||
"temperature": { | ||
"max": "17", | ||
"min": "4" | ||
}, | ||
"wind": "13" | ||
}, | ||
{ | ||
"date": "Sun 27 March", | ||
"description": "Clear conditions throughout the day.", | ||
"humidity": 55.9, | ||
"icon": "M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z", | ||
"temperature": { | ||
"max": "18", | ||
"min": "3" | ||
}, | ||
"wind": "12" | ||
} | ||
]; | ||
{ | ||
date: 'Wed 23 March', | ||
description: 'Clear conditions throughout the day.', | ||
humidity: 52.7, | ||
icon: | ||
'M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z', | ||
temperature: { | ||
max: '18', | ||
min: '-3', | ||
}, | ||
wind: '12', | ||
}, | ||
{ | ||
date: 'Thu 24 March', | ||
description: 'Clear conditions throughout the day.', | ||
humidity: 53.9, | ||
icon: | ||
'M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z', | ||
temperature: { | ||
max: '17', | ||
min: '2', | ||
}, | ||
wind: '10', | ||
}, | ||
{ | ||
date: 'Fri 25 March', | ||
description: 'Clear conditions throughout the day.', | ||
humidity: 55.5, | ||
icon: | ||
'M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z', | ||
temperature: { | ||
max: '17', | ||
min: '4', | ||
}, | ||
wind: '15', | ||
}, | ||
{ | ||
date: 'Sat 26 March', | ||
description: 'Clear conditions throughout the day.', | ||
humidity: 54.3, | ||
icon: | ||
'M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z', | ||
temperature: { | ||
max: '17', | ||
min: '4', | ||
}, | ||
wind: '13', | ||
}, | ||
{ | ||
date: 'Sun 27 March', | ||
description: 'Clear conditions throughout the day.', | ||
humidity: 55.9, | ||
icon: | ||
'M0 15.375q0-0.609 0.422-1.031 0.438-0.406 1-0.406h3.406q0.578 0 0.961 0.422t0.383 1.016-0.383 1.008-0.961 0.414h-3.406q-0.578 0-1-0.422t-0.422-1zM4.766 26.922q0-0.578 0.391-1.016l2.453-2.375q0.375-0.391 0.984-0.391 0.594 0 0.992 0.375t0.398 0.953q0 0.609-0.406 1.063l-2.375 2.375q-1.016 0.797-2.047 0-0.391-0.422-0.391-0.984zM4.766 3.844q0-0.578 0.391-1.016 0.484-0.406 1.063-0.406 0.547 0 0.984 0.406l2.375 2.453q0.406 0.375 0.406 0.984 0 0.594-0.398 0.992t-0.992 0.398q-0.609 0-0.984-0.406l-2.453-2.375q-0.391-0.422-0.391-1.031zM9.016 15.375q0-2.328 1.172-4.336t3.18-3.18 4.336-1.172q1.75 0 3.359 0.695t2.773 1.859 1.852 2.773 0.688 3.359q0 2.344-1.164 4.344t-3.164 3.164-4.344 1.164-4.344-1.164-3.172-3.164-1.172-4.344zM11.844 15.375q0 2.438 1.711 4.164t4.148 1.727 4.164-1.727 1.727-4.164q0-2.406-1.727-4.109t-4.164-1.703q-2.422 0-4.141 1.703t-1.719 4.109zM16.281 28.328q0-0.594 0.414-1t1.008-0.406q0.609 0 1.016 0.406t0.406 1v3.313q0 0.609-0.414 1.031t-1.008 0.422-1.008-0.422-0.414-1.031v-3.313zM16.281 2.5v-3.406q0-0.578 0.422-1t1-0.422 1 0.422 0.422 1v3.406q0 0.578-0.414 0.961t-1.008 0.383-1.008-0.383-0.414-0.961zM25.484 24.469q0-0.578 0.375-0.938 0.375-0.391 0.938-0.391 0.609 0 1 0.391l2.438 2.375q0.406 0.438 0.406 1.016t-0.406 0.984q-1 0.781-2 0l-2.375-2.375q-0.375-0.422-0.375-1.063zM25.484 6.266q0-0.625 0.375-0.984l2.375-2.453q0.438-0.406 0.984-0.406 0.594 0 1.008 0.422t0.414 1q0 0.625-0.406 1.031l-2.438 2.375q-0.453 0.406-1 0.406-0.563 0-0.938-0.398t-0.375-0.992zM29.25 15.375q0-0.594 0.406-1.031 0.406-0.406 0.953-0.406h3.375q0.578 0 1.008 0.43t0.43 1.008-0.43 1-1.008 0.422h-3.375q-0.578 0-0.969-0.414t-0.391-1.008z', | ||
temperature: { | ||
max: '18', | ||
min: '3', | ||
}, | ||
wind: '12', | ||
}, | ||
]; |
import React from 'react'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import snapshot from 'check-snapshot'; | ||
import { checkSnapshot } from './test-utils'; | ||
import Forecast from '../src/js/components/Forecast'; | ||
@@ -13,3 +13,3 @@ import { mappedForecast } from './fixtures/openweather/forecast'; | ||
}; | ||
snapshot( | ||
checkSnapshot( | ||
<Forecast unitsLabels={labels} forecast={mappedForecast} theme={{}} />, | ||
@@ -16,0 +16,0 @@ ); |
import React from 'react'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import snapshot from 'check-snapshot'; | ||
import { checkSnapshot } from './test-utils'; | ||
import ReactWeather from '../src/js/components/ReactWeather'; | ||
@@ -10,3 +10,3 @@ import { mappedForecast as forecast } from './fixtures/openweather/forecast'; | ||
test('should render the loader when isLoading is true ', () => { | ||
snapshot( | ||
checkSnapshot( | ||
<ReactWeather | ||
@@ -22,3 +22,3 @@ data={null} | ||
test('should render the errormessage when provided with one', () => { | ||
snapshot( | ||
checkSnapshot( | ||
<ReactWeather | ||
@@ -32,3 +32,3 @@ data={null} | ||
test('should render null when no data is provided', () => { | ||
snapshot( | ||
checkSnapshot( | ||
<ReactWeather data={null} errorMessage={null} isLoading={false} />, | ||
@@ -42,3 +42,3 @@ ); | ||
}; | ||
snapshot( | ||
checkSnapshot( | ||
<ReactWeather | ||
@@ -45,0 +45,0 @@ data={data} |
import React from 'react'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import snapshot from 'check-snapshot'; | ||
import { checkSnapshot } from './test-utils'; | ||
import Today from '../src/js/components/Today'; | ||
@@ -13,3 +13,3 @@ import { mappedCurrent as current } from './fixtures/openweather/current'; | ||
}; | ||
snapshot( | ||
checkSnapshot( | ||
<Today current={current} unitsLabels={labels} lang="en" theme={{}} />, | ||
@@ -16,0 +16,0 @@ ); |
@@ -12,7 +12,4 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
} from '../src/js/providers/visualcrossing/useVisualCrossing'; | ||
import { mappedCurrent } from './fixtures/visualcrossing/current'; | ||
import { | ||
mappedCurrent, | ||
apiCurrentResponse, | ||
} from './fixtures/visualcrossing/current'; | ||
import { | ||
mappedForecast, | ||
@@ -26,3 +23,5 @@ apiForecastResponse, | ||
test('should return formatted date', () => { | ||
expect(formatDate('1573516800', null, 'Europe/Berlin')).toEqual('Tue 12 November'); // depends on timezone of Javascript runtime. time epoch is relative to UTC | ||
expect(formatDate('1573516800', null, 'Europe/Berlin')).toEqual( | ||
'Tue 12 November', | ||
); // depends on timezone of Javascript runtime. time epoch is relative to UTC | ||
}); | ||
@@ -33,11 +32,24 @@ test('return empty string if input date is invalid', () => { | ||
test('should map today data', () => { | ||
const mapped = mapCurrent(apiForecastResponse.days[0], apiForecastResponse.currentConditions, 'en', apiForecastResponse.timezone); | ||
const mapped = mapCurrent( | ||
apiForecastResponse.days[0], | ||
apiForecastResponse.currentConditions, | ||
'en', | ||
apiForecastResponse.timezone, | ||
); | ||
expect(mapped).toEqual(mappedCurrent); | ||
}); | ||
test('should map forecast data', () => { | ||
const mapped = mapForecast(apiForecastResponse.days, 'en', apiForecastResponse.timezone); | ||
const mapped = mapForecast( | ||
apiForecastResponse.days, | ||
'en', | ||
apiForecastResponse.timezone, | ||
); | ||
expect(mapped).toEqual(mappedForecast); | ||
}); | ||
test('should map combined current and forecast data', () => { | ||
const mapped = mapData(apiForecastResponse, 'en', apiForecastResponse.timezone); | ||
const mapped = mapData( | ||
apiForecastResponse, | ||
'en', | ||
apiForecastResponse.timezone, | ||
); | ||
const expected = { | ||
@@ -66,3 +78,2 @@ current: mappedCurrent, | ||
unit: 'metric', | ||
}), | ||
@@ -87,3 +98,5 @@ ); | ||
mock.onGet().reply(500); | ||
const { result, waitForNextUpdate } = renderHook(() => useVisualCrossing({})); | ||
const { result, waitForNextUpdate } = renderHook(() => | ||
useVisualCrossing({}), | ||
); | ||
@@ -90,0 +103,0 @@ result.current.fetchData(); |
@@ -24,3 +24,7 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
test('should map today data', () => { | ||
const mapped = mapCurrent(apiForecastResponse.data[0], 33.33, 'en'); | ||
const mapped = mapCurrent( | ||
apiForecastResponse.data[0], | ||
apiCurrentResponse.data[0], | ||
'en', | ||
); | ||
expect(mapped).toMatchSnapshot(); | ||
@@ -27,0 +31,0 @@ }); |
import React from 'react'; | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import snapshot from 'check-snapshot'; | ||
import { checkSnapshot } from './test-utils'; | ||
import WeatherIcon from '../src/js/components/WeatherIcon'; | ||
@@ -8,3 +8,3 @@ | ||
test('render WeatherIcon', () => { | ||
snapshot( | ||
checkSnapshot( | ||
<WeatherIcon | ||
@@ -11,0 +11,0 @@ path="svg path here" |
import Enzyme from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; | ||
Enzyme.configure({ adapter: new Adapter() }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
39
-7.14%54
1.89%0
-100%100
25%2070
0.29%11
-8.33%1
-66.67%709440
-2.99%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated