upgrade packages (#87)
* upgrade react * further react upgrade * yarn upgrade * upgrade node-sass * upgrade node in dockerfile and actions * fix test * fix other testmain
parent
368e6df07d
commit
f35ded248e
|
@ -7,6 +7,9 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
- name: cache node modules
|
- name: cache node modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
|
@ -34,6 +37,9 @@ jobs:
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:10.24-buster
|
FROM node:16-buster-slim
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y libusb-dev libudev-dev && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y libusb-dev libudev-dev && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
10
package.json
10
package.json
|
@ -8,7 +8,7 @@
|
||||||
"@commaai/hls.js": "^0.12.7",
|
"@commaai/hls.js": "^0.12.7",
|
||||||
"@commaai/log_reader": "^0.5.5",
|
"@commaai/log_reader": "^0.5.5",
|
||||||
"@commaai/my-comma-auth": "^1.4.1",
|
"@commaai/my-comma-auth": "^1.4.1",
|
||||||
"@commaai/pandajs": "^0.3.4",
|
"@commaai/pandajs": "^0.3.7",
|
||||||
"@craco/craco": "^5.5.0",
|
"@craco/craco": "^5.5.0",
|
||||||
"ap": "^0.2.0",
|
"ap": "^0.2.0",
|
||||||
"aphrodite": "^1.2.1",
|
"aphrodite": "^1.2.1",
|
||||||
|
@ -39,14 +39,14 @@
|
||||||
"lint-staged": "^9.4.0",
|
"lint-staged": "^9.4.0",
|
||||||
"localforage": "^1.7.1",
|
"localforage": "^1.7.1",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"node-sass": "^4.12.0",
|
"node-sass": "^7.0.1",
|
||||||
"prettier": "^1.9.2",
|
"prettier": "^1.9.2",
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"query-string": "^5.0.1",
|
"query-string": "^5.0.1",
|
||||||
"randomcolor": "^0.5.4",
|
"randomcolor": "^0.5.4",
|
||||||
"raven-js": "^3.16.0",
|
"raven-js": "^3.16.0",
|
||||||
"react": "^16.2.0",
|
"react": "~16.14",
|
||||||
"react-dom": "^16.2.0",
|
"react-dom": "~16.14",
|
||||||
"react-emotion": "^8.0.12",
|
"react-emotion": "^8.0.12",
|
||||||
"react-infinite": "^0.11.0",
|
"react-infinite": "^0.11.0",
|
||||||
"react-list": "^0.8.6",
|
"react-list": "^0.8.6",
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
"react-test-renderer": "^16.2.0",
|
"react-test-renderer": "^16.2.0",
|
||||||
"react-vega": "^7.0.0",
|
"react-vega": "^7.0.0",
|
||||||
"react-visibility-sensor": "^3.10.1",
|
"react-visibility-sensor": "^3.10.1",
|
||||||
"right-pad": "^1.0.1",
|
"simple-get": "^4.0.1",
|
||||||
"simple-statistics": "^4.1.0",
|
"simple-statistics": "^4.1.0",
|
||||||
"socket.io-client": "^2.0.3",
|
"socket.io-client": "^2.0.3",
|
||||||
"stream-selector": "^0.1.1",
|
"stream-selector": "^0.1.1",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { createJestConfig } = require('@craco/craco');
|
const { createJestConfig } = require('@craco/craco');
|
||||||
const cracoConfig = require('../../craco.config.js');
|
const cracoConfig = require('../../craco.config.js');
|
||||||
|
|
||||||
const jestConfig = createJestConfig(cracoConfig);
|
const jestConfig = createJestConfig(cracoConfig({ env: process.env.NODE_ENV }));
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...jestConfig,
|
...jestConfig,
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
import CanExplorer from './CanExplorer';
|
||||||
import init from './init';
|
import init from './init';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
init();
|
init().then((props) => {
|
||||||
|
ReactDOM.render(<CanExplorer {...props} />, document.getElementById('root')); // eslint-disable-line react/jsx-props-no-spreading
|
||||||
|
});
|
||||||
|
|
13
src/init.js
13
src/init.js
|
@ -1,10 +1,7 @@
|
||||||
import React from 'react';
|
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import qs from 'query-string';
|
import qs from 'query-string';
|
||||||
import CommaAuth, { config as AuthConfig, storage as AuthStorage } from '@commaai/my-comma-auth';
|
import CommaAuth, { config as AuthConfig, storage as AuthStorage } from '@commaai/my-comma-auth';
|
||||||
import { auth as AuthApi, request as Request } from '@commaai/comma-api';
|
import { auth as AuthApi, request as Request } from '@commaai/comma-api';
|
||||||
import Sentry from './logging/Sentry';
|
import Sentry from './logging/Sentry';
|
||||||
import CanExplorer from './CanExplorer';
|
|
||||||
import { getUrlParameter, modifyQueryParameters } from './utils/url';
|
import { getUrlParameter, modifyQueryParameters } from './utils/url';
|
||||||
import { GITHUB_AUTH_TOKEN_KEY } from './config';
|
import { GITHUB_AUTH_TOKEN_KEY } from './config';
|
||||||
import {
|
import {
|
||||||
|
@ -112,11 +109,9 @@ export default function init() {
|
||||||
props.githubAuthToken = fetchPersistedGithubAuthToken();
|
props.githubAuthToken = fetchPersistedGithubAuthToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function renderDom() {
|
return new Promise((resolve) => {
|
||||||
ReactDOM.render(<CanExplorer {...props} />, document.getElementById('root')); // eslint-disable-line react/jsx-props-no-spreading
|
authenticate().then(() => {
|
||||||
}
|
resolve(props);
|
||||||
|
});
|
||||||
authenticate().then(() => {
|
|
||||||
renderDom();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ import init from './init';
|
||||||
|
|
||||||
describe('init', () => {
|
describe('init', () => {
|
||||||
it('works without url params', () => {
|
it('works without url params', () => {
|
||||||
init();
|
init().then((props) => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import rightPad from 'right-pad';
|
|
||||||
import CloudLog from '../../logging/CloudLog';
|
import CloudLog from '../../logging/CloudLog';
|
||||||
import Signal from './signal';
|
import Signal from './signal';
|
||||||
import Frame from './frame';
|
import Frame from './frame';
|
||||||
|
@ -608,7 +607,7 @@ export default class DBC {
|
||||||
let paddedBuffer = buffer;
|
let paddedBuffer = buffer;
|
||||||
if (buffer.length !== 8) {
|
if (buffer.length !== 8) {
|
||||||
// pad data it's 64 bits long
|
// pad data it's 64 bits long
|
||||||
const paddedDataHex = rightPad(buffer.toString('hex'), 16, '0');
|
const paddedDataHex = buffer.toString('hex').padEnd(16, '0');
|
||||||
paddedBuffer = Buffer.from(paddedDataHex, 'hex');
|
paddedBuffer = Buffer.from(paddedDataHex, 'hex');
|
||||||
}
|
}
|
||||||
const hexData = paddedBuffer.toString('hex');
|
const hexData = paddedBuffer.toString('hex');
|
||||||
|
|
Loading…
Reference in New Issue