Skip to content

Commit

Permalink
feat(nodejs-12): Bump che-theia to nodejs 12
Browse files Browse the repository at this point in the history
eclipse-che/che#17441

Change-Id: I976de042d113dbeda26c7c8cf35ef0892e74e9e6
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
  • Loading branch information
benoitf committed Jul 20, 2020
1 parent 647d813 commit 5665717
Show file tree
Hide file tree
Showing 20 changed files with 437 additions and 453 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-node@v1
name: Configuring nodejs 10.x version
with:
node-version: '10.x'
node-version: '12.x'
- name: build
run: yarn
docker-build:
Expand All @@ -37,7 +37,7 @@ jobs:
- uses: actions/setup-node@v1
name: Configuring nodejs 10.x version
with:
node-version: '10.x'
node-version: '12.x'
- name: build
run: |
docker image prune -a -f
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:10.20.1-alpine3.11
FROM node:12.18.2-alpine3.12
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ RUN apk add --update --no-cache \
# To play with json in shell
jq \
# compile some javascript native stuff (node-gyp)
make gcc g++ python \
make gcc g++ python2 \
# clone repositories (and also using ssh repositories)
git openssh openssh-keygen man git-doc \
git openssh openssh-keygen mandoc git-doc \
# Handle git diff properly
less \
# bash shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-10
FROM registry.access.redhat.com/ubi8/nodejs-10:1-82.1589298623
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-12
FROM registry.access.redhat.com/ubi8/nodejs-12:1-45
2 changes: 1 addition & 1 deletion dockerfiles/theia-endpoint-runtime-binary/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ENV PATH=${HOME}/.yarn/bin:${PATH}
#{INCLUDE:docker/${BUILD_IMAGE_TARGET}/builder-setup.dockerfile}
RUN yarn global add ${YARN_FLAGS} nexe@3.3.2
RUN nexe -v && \
# Build remote binary with node runtime 10.16.0 and che-theia node dependencies. nexe icludes to the binary only
# Build remote binary with node runtime 12.x and che-theia node dependencies. nexe icludes to the binary only
# necessary dependencies.
nexe node_modules/@eclipse-che/theia-remote/lib/node/plugin-remote.js ${NEXE_FLAGS} -o ${HOME}/plugin-remote-endpoint

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM quay.io/eclipse/che-custom-nodejs-deasync:10.20.1 as custom-nodejs
FROM quay.io/eclipse/che-custom-nodejs-deasync:12.18.0 as custom-nodejs
FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia:${BUILD_TAG} as builder
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM alpine:3.11.5 as runtime
FROM alpine:3.12.0 as runtime
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM quay.io/eclipse/che-custom-nodejs-deasync:10.20.1 as custom-nodejs
FROM quay.io/eclipse/che-custom-nodejs-deasync:12.18.0 as custom-nodejs
FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia:${BUILD_TAG} as builder
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:10.20.1-alpine3.11 as build-result
FROM node:12.18.2-alpine3.12 as build-result
2 changes: 1 addition & 1 deletion dockerfiles/theia/docker/alpine/runtime-from.dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:10.20.1-alpine3.11 as runtime
FROM node:12.18.2-alpine3.12 as runtime
4 changes: 2 additions & 2 deletions dockerfiles/theia/docker/ubi8/build-result-from.dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-10
FROM registry.access.redhat.com/ubi8/nodejs-10:1-82.1589298623 as build-result
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-12
FROM registry.access.redhat.com/ubi8/nodejs-12:1-45 as build-result
USER root
4 changes: 2 additions & 2 deletions dockerfiles/theia/docker/ubi8/runtime-from.dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-10
FROM registry.access.redhat.com/ubi8/nodejs-10:1-82.1589298623 as runtime
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-12
FROM registry.access.redhat.com/ubi8/nodejs-12:1-45 as runtime
2 changes: 1 addition & 1 deletion generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@types/jest": "25.2.1",
"@types/js-yaml": "3.11.2",
"@types/mustache": "0.8.32",
"@types/node": "^10.0.0",
"@types/node": "^12.0.0",
"@types/read-pkg": "3.0.0",
"@types/tmp": "^0.0.33",
"@types/webpack": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions generator/tests/init-sources/assembly-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"version": "0.0.0",
"engines": {
"yarn": "1.0.x || >=1.2.1",
"node": ">=7.9.0"
"node": ">=12"
},
"resolution": {
"**/@types/node": "8.10.20"
"**/@types/node": "12.8.2"
},
"devDependencies": {
"@types/chai": "^4.0.1",
"@types/chai-string": "^1.4.0",
"@types/jsdom": "^11.0.4",
"@types/mocha": "^2.2.41",
"@types/node": "8.10.20",
"@types/node": "^12.0.0",
"@types/sinon": "^2.3.5",
"@types/temp": "^0.8.29",
"@types/webdriverio": "^4.7.0",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "root",
"private": true,
"engines": {
"node": ">=10.11.0 <13"
},
"devDependencies": {
"@types/jest": "25.2.1",
"tslint-language-service": "^0.9.9",
Expand All @@ -25,7 +28,7 @@
"publish:next": "lerna run publish:next"
},
"resolutions": {
"**/**/@types/node": "^10.0.0",
"**/**/@types/node": "^12.0.0",
"**/**/minimist": "^1.2.0",
"**/**/nsfw": "1.2.7",
"**/mkdirp": "^0.5.1"
Expand Down
2 changes: 1 addition & 1 deletion plugins/ports-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@theia/plugin": "next",
"@theia/plugin-packager": "latest",
"@types/jest": "25.2.1",
"@types/node": "^10.0.0"
"@types/node": "^12.0.0"
},
"scripts": {
"prepare": "yarn clean && yarn build && yarn lint:fix && yarn test",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ssh-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@eclipse-che/plugin": "0.0.1"
},
"devDependencies": {
"@types/node": "^10.0.0",
"@types/node": "^12.0.0",
"@eclipse-che/api": "latest",
"@eclipse-che/plugin": "0.0.1",
"@theia/plugin": "next",
Expand Down
2 changes: 1 addition & 1 deletion plugins/workspace-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fs-extra": "7.0.1"
},
"devDependencies": {
"@types/node": "^10.0.0",
"@types/node": "^12.0.0",
"@eclipse-che/api": "latest",
"@eclipse-che/plugin": "0.0.1",
"@theia/plugin": "next",
Expand Down
26 changes: 15 additions & 11 deletions plugins/workspace-plugin/src/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,30 @@
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/

import { spawn, SpawnOptions } from 'child_process';
import { spawn, SpawnOptionsWithoutStdio } from 'child_process';
import { askpassEnv } from './askpass';

export async function execute(commandLine: string, args?: string[], options?: SpawnOptions): Promise<string> {
export async function execute(commandLine: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): Promise<string> {
return new Promise<string>((resolve, reject) => {
if (options && askpassEnv) {
options.env = mergeProcessEnv(options.env);
}
const command = spawn(commandLine, args, options);
let result = '';
let error = '';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
command.stdout.on('data', (data: any) => {
result += data.toString();
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
command.stderr.on('data', (data: any) => {
error += data.toString();
console.error(`Child process ${commandLine} stderr: ${data}`);
});
if (command.stdout) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
command.stdout.on('data', (data: any) => {
result += data.toString();
});
}
if (command.stderr) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
command.stderr.on('data', (data: any) => {
error += data.toString();
console.error(`Child process ${commandLine} stderr: ${data}`);
});
}
command.on('close', (code: number | null) => {
// eslint-disable-next-line no-null/no-null
code = code === null ? 0 : code;
Expand Down

0 comments on commit 5665717

Please sign in to comment.