Skip to content

Update to node 16.14.2, update all dependencies to latest minor version #1906

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

Merged
merged 24 commits into from
Apr 25, 2022
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bed219b
Update to node 14.17.3, update all dependencies to latest minor version
catarak Jul 19, 2021
e6ca169
Update node version in test.yml
catarak Jul 19, 2021
ee90adf
Update populateUserData in createProject to return a promise
catarak Jul 19, 2021
efc7671
Convert mockingoose statement to require to fix project.test.js
catarak Jul 19, 2021
82fc39e
Update createProject test to pass with new populateUserData
catarak Jul 20, 2021
155e2dc
Fix Toolbar.unit.test from name input race condition
catarak Jul 20, 2021
944d197
Try to fix Sketchlist.unit.test, but haven't fixed it yet
catarak Jul 20, 2021
ffa94fd
Update node version to 16.13.0
catarak Nov 17, 2021
c7fb8a2
Fix tests for node v16
catarak Nov 17, 2021
5cb5cb5
Update node version in GitHub Test action
catarak Nov 17, 2021
2d7456b
Merge develop
catarak Apr 13, 2022
539bea9
Update node version to 16.14.2
catarak Apr 13, 2022
3069612
Update node version in package.json
catarak Apr 13, 2022
dfc5cfa
Remove sass-extract dependency
catarak Apr 13, 2022
cbade47
Replace deprecated bcrypt-nodejs with bcryptjs
catarak Apr 13, 2022
327b33c
Update nodemailer
catarak Apr 13, 2022
d005c3f
Update redux-devtools
catarak Apr 13, 2022
02ec981
Replace node-uuid with uuid
catarak Apr 13, 2022
2258c08
Replace babel-eslint with @babel/eslint-parser
catarak Apr 13, 2022
47bff15
Move @babel/eslint-parser to dev dependencies
catarak Apr 13, 2022
f54fe11
Update bson-objectid
catarak Apr 13, 2022
15e48f7
Merge branch 'develop' into chore/update-node
catarak Apr 19, 2022
715b522
Remove @babel/polyfill, add regenerator-runtime
catarak Apr 19, 2022
5fdb80e
Update package-lock.json
catarak Apr 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -40,7 +40,8 @@
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
"@babel/plugin-proposal-function-bind",
["@babel/plugin-proposal-private-methods", { "loose": true }]
],
"presets": [
"@babel/preset-env",
@@ -85,6 +86,7 @@
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
"@babel/plugin-proposal-function-bind",
["@babel/plugin-proposal-private-methods", { "loose": true }]
]
}
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["airbnb", "prettier"],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"node": true,
@@ -69,7 +69,7 @@
"react", "jsx-a11y", "import", "prettier"
],
"settings": {
"import/parser": "babel-eslint",
"import/parser": "@babel/eslint-parser",
"import/resolve": {
"moduleDirectory": ["node_modules"]
}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '16.x'
- run: npm install
- run: npm run test
- run: npm run lint
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.16.1
16.14.2
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
language: node_js
node_js:
- "12.16.1"
- "16.14.2"

cache:
directories:
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.16.1 as base
FROM node:16.14.2 as base
ENV APP_HOME=/usr/src/app \
TERM=xterm
RUN mkdir -p $APP_HOME
9 changes: 1 addition & 8 deletions client/index.integration.test.jsx
Original file line number Diff line number Diff line change
@@ -3,14 +3,7 @@ import { rest } from 'msw';
import React from 'react';
import { Router, browserHistory } from 'react-router';

import {
reduxRender,
act,
waitFor,
fireEvent,
screen,
within
} from './test-utils';
import { reduxRender, act, waitFor, screen, within } from './test-utils';
import configureStore from './store';
import routes from './routes';
import * as Actions from './modules/User/actions';
2 changes: 1 addition & 1 deletion client/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@babel/polyfill';
import 'regenerator-runtime/runtime';

// See: https://github.com/testing-library/jest-dom
// eslint-disable-next-line import/no-extraneous-dependencies
6 changes: 3 additions & 3 deletions client/modules/App/components/DevTools.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
import { createDevTools } from '@redux-devtools/core';
import { LogMonitor } from '@redux-devtools/log-monitor';
import { DockMonitor } from '@redux-devtools/dock-monitor';

const devTools = (
<DockMonitor toggleVisibilityKey="ctrl-h" changePositionKey="ctrl-w">
113 changes: 108 additions & 5 deletions client/modules/IDE/components/Console.jsx
Original file line number Diff line number Diff line change
@@ -7,11 +7,6 @@ import { bindActionCreators } from 'redux';
import { useSelector, useDispatch } from 'react-redux';
import classNames from 'classnames';
import { Console as ConsoleFeed } from 'console-feed';
import {
CONSOLE_FEED_LIGHT_STYLES,
CONSOLE_FEED_DARK_STYLES,
CONSOLE_FEED_CONTRAST_STYLES
} from '../../../styles/components/_console-feed.scss';
import warnLightUrl from '../../../images/console-warn-light.svg?byUrl';
import warnDarkUrl from '../../../images/console-warn-dark.svg?byUrl';
import warnContrastUrl from '../../../images/console-warn-contrast.svg?byUrl';
@@ -42,6 +37,114 @@ import { useDidUpdate } from '../hooks/custom-hooks';
import useHandleMessageEvent from '../hooks/useHandleMessageEvent';
import { listen } from '../../../utils/dispatcher';

const CONSOLE_FEED_WITHOUT_ICONS = {
LOG_WARN_ICON: 'none',
LOG_ERROR_ICON: 'none',
LOG_DEBUG_ICON: 'none',
LOG_INFO_ICON: 'none'
};

const CONSOLE_FEED_LIGHT_STYLES = {
BASE_BACKGROUND_COLOR: '',
LOG_ERROR_BACKGROUND: 'hsl(0, 100%, 97%)',
LOG_ERROR_COLOR: '#D11518',
LOG_ERROR_BORDER: 'hsl(0, 100%, 92%)',
LOG_WARN_BACKGROUND: 'hsl(50, 100%, 95%)',
LOG_WARN_COLOR: '#996B00',
LOG_WARN_BORDER: 'hsl(50, 100%, 88%)',
LOG_INFO_COLOR: '#4D4D4D',
LOG_DEBUG_COLOR: '#0071AD',
LOG_DEBUG_BACKGROUND: '#D6F1FF',
LOG_DEBUG_BORDER: '#C2EBFF',
LOG_COLOR: '#4D4D4D',
ARROW_COLOR: '#666',
OBJECT_NAME_COLOR: '#333',
OBJECT_VALUE_NULL_COLOR: '#747474',
OBJECT_VALUE_UNDEFINED_COLOR: '#747474',
OBJECT_VALUE_STRING_COLOR: '#47820A',
OBJECT_VALUE_REGEXP_COLOR: '#A06801',
OBJECT_VALUE_NUMBER_COLOR: '#333',
OBJECT_VALUE_BOOLEAN_COLOR: '#D52889',
OBJECT_VALUE_FUNCTION_KEYWORD_COLOR: '#0B7CA9',
LOG_AMOUNT_BACKGROUND: '#5276B7',
LOG_AMOUNT_COLOR: '#FFF',
LOG_WARN_AMOUNT_BACKGROUND: '#996B00',
LOG_ERROR_AMOUNT_BACKGROUND: '#D11518',
LOG_DEBUG_AMOUNT_BACKGROUND: '#0071AD'
};

const CONSOLE_FEED_DARK_STYLES = {
BASE_BACKGROUND_COLOR: '',
BASE_COLOR: 'white',
OBJECT_NAME_COLOR: 'white',
OBJECT_VALUE_NULL_COLOR: '#DE4A9B',
OBJECT_VALUE_UNDEFINED_COLOR: '#DE4A9B',
OBJECT_VALUE_REGEXP_COLOR: '#EE9900',
OBJECT_VALUE_STRING_COLOR: '#58a10b',
OBJECT_VALUE_SYMBOL_COLOR: 'hsl(230, 100%, 80%)',
OBJECT_VALUE_NUMBER_COLOR: 'white',
OBJECT_VALUE_BOOLEAN_COLOR: '#DE4A9B',
OBJECT_VALUE_FUNCTION_KEYWORD_COLOR: '#b58318',
LOG_ERROR_BACKGROUND: '#1F0000',
LOG_ERROR_COLOR: '#DF3A3D',
LOG_WARN_BACKGROUND: 'hsl(50, 100%, 10%)',
LOG_WARN_COLOR: '#F5BC38',
LOG_INFO_COLOR: '#D9D9D9',
LOG_INFO_BORDER: '#4D4D4D',
LOG_COLOR: '#D9D9D9',
LOG_DEBUG_COLOR: '#0C99E2',
LOG_DEBUG_BACKGROUND: '#05232E',
LOG_DEBUG_BORDER: '#0C546E',
TABLE_BORDER_COLOR: 'grey',
TABLE_TH_BACKGROUND_COLOR: 'transparent',
TABLE_TH_HOVER_COLOR: 'grey',
TABLE_SORT_ICON_COLOR: 'grey',
TABLE_DATA_BACKGROUND_IMAGE: 'grey',
TABLE_DATA_BACKGROUND_SIZE: 'grey',
ARROW_COLOR: '#D9D9D9',
LOG_AMOUNT_BACKGROUND: '#5276B7',
LOG_AMOUNT_COLOR: '#333',
LOG_WARN_AMOUNT_BACKGROUND: '#996B00',
LOG_ERROR_AMOUNT_BACKGROUND: '#D11518',
LOG_DEBUG_AMOUNT_BACKGROUND: '#0071AD'
};

const CONSOLE_FEED_CONTRAST_STYLES = {
BASE_BACKGROUND_COLOR: '',
BASE_COLOR: 'white',
OBJECT_NAME_COLOR: 'white',
OBJECT_VALUE_NULL_COLOR: '#FFA9D9',
OBJECT_VALUE_UNDEFINED_COLOR: '#FFA9D9',
OBJECT_VALUE_REGEXP_COLOR: '#2DE9B6',
OBJECT_VALUE_STRING_COLOR: '#2DE9B6',
OBJECT_VALUE_SYMBOL_COLOR: '#B3BEFF',
OBJECT_VALUE_NUMBER_COLOR: '#FFA9D9',
OBJECT_VALUE_BOOLEAN_COLOR: '#FFA9D9',
OBJECT_VALUE_FUNCTION_KEYWORD_COLOR: '#F5DC23',
LOG_ERROR_BACKGROUND: '#1F0000',
LOG_ERROR_COLOR: '#EA7B7D',
LOG_WARN_BACKGROUND: 'hsl(50, 100%, 10%)',
LOG_WARN_COLOR: '#F5BC38',
LOG_INFO_COLOR: '#D9D9D9',
LOG_INFO_BORDER: '#4D4D4D',
LOG_COLOR: '#D9D9D9',
LOG_DEBUG_COLOR: '#38B6F5',
LOG_DEBUG_BACKGROUND: '#05232E',
LOG_DEBUG_BORDER: '#0C546E',
TABLE_BORDER_COLOR: 'grey',
TABLE_TH_BACKGROUND_COLOR: 'transparent',
TABLE_TH_HOVER_COLOR: 'grey',
TABLE_SORT_ICON_COLOR: 'grey',
TABLE_DATA_BACKGROUND_IMAGE: 'grey',
TABLE_DATA_BACKGROUND_SIZE: 'grey',
ARROW_COLOR: '#D9D9D9',
LOG_AMOUNT_BACKGROUND: '#5276B7',
LOG_AMOUNT_COLOR: '#333',
LOG_WARN_AMOUNT_BACKGROUND: '#966C08',
LOG_ERROR_AMOUNT_BACKGROUND: '#DD3134',
LOG_DEBUG_AMOUNT_BACKGROUND: '#097BB3'
};

const getConsoleFeedStyle = (theme, fontSize) => {
const style = {
BASE_FONT_FAMILY: 'Inconsolata, monospace'
2 changes: 1 addition & 1 deletion client/modules/IDE/components/Editor.jsx
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import CodeMirror from 'codemirror';
import emmet from '@emmetio/codemirror-plugin';
import prettier from 'prettier';
import prettier from 'prettier/standalone';
import babelParser from 'prettier/parser-babel';
import htmlParser from 'prettier/parser-html';
import cssParser from 'prettier/parser-postcss';
107 changes: 0 additions & 107 deletions client/styles/components/_console-feed.scss

This file was deleted.

6 changes: 4 additions & 2 deletions client/utils/reduxFormUtils.js
Original file line number Diff line number Diff line change
@@ -16,8 +16,10 @@ export const domOnlyProps = ({
...domProps }) => domProps;
/* eslint-enable */

// eslint-disable-next-line max-len
const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i;
/* eslint-disable */
const EMAIL_REGEX =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i;
/* eslint-enable */

function validateNameEmail(formProps, errors) {
if (!formProps.username) {
4 changes: 2 additions & 2 deletions contributor_docs/installation.md
Original file line number Diff line number Diff line change
@@ -6,15 +6,15 @@ Follow these instructions to set up your development environment, which you need

_Note_: The installation steps assume you are using a Unix-like shell. If you are using Windows, you will need to use `copy` instead of `cp`.

1. Install Node.js. The recommended way is to Node through [nvm](https://github.com/nvm-sh/nvm). You can also install [node.js](https://nodejs.org/download/release/v12.16.1/) version 12.16.1 directly from the Node.js website.
1. Install Node.js. The recommended way is to Node through [nvm](https://github.com/nvm-sh/nvm). You can also install [node.js](https://nodejs.org/download/release/v16.14.2/) version 16.14.2 directly from the Node.js website.
2. [Fork](https://help.github.com/articles/fork-a-repo) the [p5.js Web Editor repository](https://github.com/processing/p5.js-web-editor) into your own GitHub account.
3. [Clone](https://help.github.com/articles/cloning-a-repository/) your new fork of the repository from GitHub onto your local computer.

```
$ git clone https://github.com/YOUR_USERNAME/p5.js-web-editor.git
```

4. If you are using nvm, run `$ nvm use` to set your Node version to 12.16.1
4. If you are using nvm, run `$ nvm use` to set your Node version to 16.14.2
5. Navigate into the project folder and install all its necessary dependencies with npm.

```
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ if (process.env.NODE_ENV === 'production') {
require('@babel/register')({
presets: ["@babel/preset-env"]
});
require('@babel/polyfill');
require('regenerator-runtime/runtime');
//// in development, let .env values override those in the environment already (i.e. in docker-compose.yml)
// so commenting this out makes the docker container work.
// if (process.env.NODE_ENV === 'development') {
Loading