Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-3029] dep updates #1508

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
17 changes: 9 additions & 8 deletions app/components/uploaderbutton/uploaderbutton.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import GitHub from 'github-api';
import { Octokit } from '@octokit/rest';
import _ from 'lodash';
import utils from '../../core/utils';
import { withTranslation } from 'react-i18next';
Expand All @@ -11,7 +11,7 @@ import AppleIcon from '../../core/icons/Apple.svg';
import WindowsIcon from '../../core/icons/Windows.svg';
import Button from '../elements/Button';

const github = new GitHub();
const octokit = new Octokit();

export default withTranslation()(class UploaderButton extends Component {
constructor(props) {
Expand All @@ -29,12 +29,13 @@ export default withTranslation()(class UploaderButton extends Component {
};

UNSAFE_componentWillMount = () => {
const uploaderRepo = github.getRepo('tidepool-org/uploader');
uploaderRepo.listReleases((err, releases, request) => {
if (err) {
this.setState({ error: true });
}
this.setState(utils.getUploaderDownloadURL(releases));
octokit.repos.listReleases({
owner: 'tidepool-org',
repo: 'uploader'
}).then(({ data }) => {
this.setState(utils.getUploaderDownloadURL(data));
}).catch((error) => {
this.setState({ error: true });
});
}

Expand Down
17 changes: 9 additions & 8 deletions app/components/uploadlaunchoverlay/uploadlaunchoverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import React, { Component } from 'react';
import { withTranslation, Trans } from 'react-i18next';
import { Flex } from 'theme-ui';
import cx from 'classnames';
import GitHub from 'github-api';
import { Octokit } from '@octokit/rest';
import ModalOverlay from '../modaloverlay';
import utils from '../../core/utils';
import { URL_UPLOADER_DOWNLOAD_PAGE } from '../../core/constants';
import logoSrc from '../uploaderbutton/images/T-logo-dark-512x512.png';
import UploaderButton from '../uploaderbutton'

const github = new GitHub();
const octokit = new Octokit();

const UploadLaunchOverlay = withTranslation()(class UploadLaunchOverlay extends Component {
constructor(props) {
Expand All @@ -28,12 +28,13 @@ const UploadLaunchOverlay = withTranslation()(class UploadLaunchOverlay extends
};

UNSAFE_componentWillMount = () => {
const uploaderRepo = github.getRepo('tidepool-org/uploader');
uploaderRepo.listReleases((err, releases, request) => {
if(err){
this.setState({error: true});
}
this.setState(utils.getUploaderDownloadURL(releases));
octokit.repos.listReleases({
owner: 'tidepool-org',
repo: 'uploader'
}).then(({ data }) => {
this.setState(utils.getUploaderDownloadURL(data));
}).catch((error) => {
this.setState({ error: true });
});
}

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"node": "20.8.0"
},
"packageManager": "[email protected]",
"version": "1.84.0-web-3274-device-settings-data-sources.1",
"version": "1.84.0-web-3029-dep-updates.1",
"private": true,
"scripts": {
"test": "TZ=UTC NODE_ENV=test NODE_OPTIONS='--max-old-space-size=4096' yarn karma start",
Expand All @@ -28,7 +28,7 @@
"dependencies": {
"body-parser": "1.20.3",
"custom-protocol-check": "1.4.0",
"express": "4.20.0",
"express": "4.21.2",
"helmet": "3.23.3",
"i18n-iso-countries": "7.7.0",
"plotly.js-basic-dist-min": "2.27.0",
Expand All @@ -51,6 +51,7 @@
"@material-ui/core": "4.12.4",
"@material-ui/icons": "4.11.3",
"@material-ui/lab": "4.0.0-alpha.61",
"@octokit/rest": "21.1.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
"@react-keycloak/web": "3.4.0",
"@storybook/addon-a11y": "7.5.1",
Expand All @@ -64,7 +65,7 @@
"@storybook/react": "7.5.0",
"@storybook/react-webpack5": "7.5.0",
"@testing-library/react-hooks": "8.0.1",
"@tidepool/viz": "1.45.0-web-3274-device-settings-data-sources.3",
"@tidepool/viz": "1.45.0-web-3029-dep-updates.1",
"async": "2.6.4",
"autoprefixer": "10.4.16",
"babel-core": "7.0.0-bridge.0",
Expand Down Expand Up @@ -103,7 +104,6 @@
"file-loader": "6.2.0",
"formik": "2.4.5",
"formik-persist-values": "1.4.1",
"github-api": "3.4.0",
"history": "4.10.1",
"html-webpack-plugin": "5.5.3",
"i18next": "23.6.0",
Expand Down Expand Up @@ -180,7 +180,7 @@
"terser": "5.22.0",
"terser-webpack-plugin": "5.3.9",
"theme-ui": "0.16.1",
"tideline": "1.31.0-web-3274-device-settings-data-sources.1",
"tideline": "1.31.0-web-3029-dep-updates.1",
"tidepool-platform-client": "0.62.0-web-3272-patient-data-linking-after-creation.1",
"tidepool-standard-action": "0.1.1",
"ua-parser-js": "1.0.36",
Expand All @@ -200,7 +200,7 @@
"redux": "4.x"
},
"resolutions": {
"express": "4.20.0",
"express": "4.21.2",
"@emotion/react": "11.5.0",
"@emotion/styled": "11.3.0",
"crypto-js": "4.2.0",
Expand Down
Loading