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

Upgrade to node v12 #2581

Merged
merged 13 commits into from
Jun 9, 2020
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
node:
docker:
- image: circleci/node:10.15
- image: cimg/node:12.18

commands:
checkout-and-dependencies:
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
clone_depth: 5
environment:
nodejs_version: "10.15"
nodejs_version: "12.18"
duncanjbain marked this conversation as resolved.
Show resolved Hide resolved
platform: x64 # flow needs 64b platforms
# Install scripts. (runs after repo cloning)
install:
# 1. Select the right node
- ps: Install-Product node $env:nodejs_version $env:platform
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:platform
# 2. Setup the project
- yarn install --frozen-lockfile

Expand Down
4 changes: 1 addition & 3 deletions bin/pre-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ function parseExpectedNodeVersion() {
const circleConfig = fs.readFileSync('.circleci/config.yml', {
encoding: 'utf8',
});
const expectedNodeVersion = /image: circleci\/node:([\d.]+)/.exec(
circleConfig
);
const expectedNodeVersion = /image: cimg\/node:([\d.]+)/.exec(circleConfig);
if (!expectedNodeVersion) {
throw new Error(
`Couldn't extract the node version from .circleci/config.yml.`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"start-examples": "ws -d examples/ -s index.html -p 4242",
"start-docs": "docsify serve ./docs-user",
"start-photon": "node res/photon/server",
"test": "cross-env LC_ALL=C NODE_ENV=test NODE_OPTIONS=--experimental-worker jest",
"test": "cross-env LC_ALL=C NODE_ENV=test jest",
"test-all": "run-p --max-parallel 4 flow license-check lint test test-alex test-lockfile",
"test-build-coverage": "jest --coverage --coverageReporters=html",
"test-serve-coverage": "ws -d coverage/ -p 4343",
Expand Down
3 changes: 1 addition & 2 deletions src/test/components/MenuButtons.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { MenuButtonsMetaInfo } from '../../components/app/MenuButtons/MetaInfo';
import { render, fireEvent, wait } from 'react-testing-library';
import { Provider } from 'react-redux';
import { storeWithProfile } from '../fixtures/stores';
import { TextEncoder } from 'util';
import { stateFromLocation } from '../../app-logic/url-handling';
import { ensureExists } from '../../utils/flow';
import {
Expand Down Expand Up @@ -144,7 +143,7 @@ describe('app/MenuButtons', function() {
if ((window: any).TextEncoder) {
throw new Error('A TextEncoder was already on the window object.');
}
(window: any).TextEncoder = TextEncoder;
(window: any).TextEncoder = new TextEncoder();
duncanjbain marked this conversation as resolved.
Show resolved Hide resolved
});

afterAll(async function() {
Expand Down