Skip to content

Commit

Permalink
Update to node 18
Browse files Browse the repository at this point in the history
Also update the required yarn version, that's somewhat related,
aligning it to what's used in upstream Theia.

Fixes eclipse-cdt-cloud#1015

Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
  • Loading branch information
marcdumais-work committed Mar 8, 2024
1 parent db536e5 commit 39dadea
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 26 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
node-version: [18]

steps:
- name: install dependencies on ubuntu
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt install -y make gcc pkg-config build-essential libx11-dev libxkbfile-dev
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -35,7 +35,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache node_modules with yarn
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -59,11 +59,11 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'

# ESLint and Prettier must be in `package.json`
- name: Install npm dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/license-check-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [16]
node: [18]
java: [11]

runs-on: ${{ matrix.os }}
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Use Java ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '18'
registry-url: 'https://registry.npmjs.org'
# Defaults to the user or organization that owns the workflow file
scope: '@theia-ide'
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN sudo apt-get update \
# Clear package info (to free space)
&& sudo rm -rf /var/lib/apt/lists/*

ENV NODE_VERSION="16.17.0"
ENV NODE_VERSION="18"
RUN bash -c ". .nvm/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm use $NODE_VERSION \
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
}
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,30 @@ While being initially used within the *theia-traceviewer*, the code base of *tra

## Build the extension and example application

First, you need Node.js and yarn:

It's suggested to install [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) to manage node on your machine. Once that's done, install the required version:

```bash
nvm install 18
# optional: make it the default version
nvm alias default
# or set it every time like so
nvm use 18
```

Then install `yarn`:

```bash
npm i -g yarn # the default version should be ok
```

Here is the step in order to build the trace viewer

1. Clone this theia-trace-extension repository
2. `cd theia-trace-extension`
3. Now you are ready to build the application: `yarn`

**Note for some Debian-based machines**: On some distributions, there are 2 yarn commands. If you get an error message saying **ERROR: There are no scenarios; must have at least one.**, you are using the wrong yarn. See [yarn issue #2821][yarn-issue-2821].

You can also run two scripts to watch for changes and rebuild automatically:

1. From the root, run:
Expand Down
4 changes: 2 additions & 2 deletions examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"watch": "theia build --watch --mode development"
},
"engines": {
"yarn": "1.0.x || >=1.2.1",
"node": ">=12.14.1 <17"
"yarn": ">=1.7.0 <2",
"node": ">=16 <19"
},
"theiaPluginsDir": "../plugins"
}
4 changes: 2 additions & 2 deletions examples/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.20.2-bookworm-slim as build
FROM node:18.19.1-bookworm-slim as build

RUN apt-get update && apt-get install -y \
git \
Expand All @@ -21,7 +21,7 @@ RUN yarn && \
echo *.spec.* >> .yarnclean && \
yarn cache clean

FROM node:16.20.2-bookworm-slim
FROM node:18.19.1-bookworm-slim

COPY --from=build /app/tte /app/tte

Expand Down
4 changes: 2 additions & 2 deletions examples/docker/example-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"watch": "theia build --watch"
},
"engines": {
"yarn": "1.0.x || >=1.2.1",
"node": ">=12.14.1 <17"
"yarn": ">=1.7.0 <2",
"node": ">=16 <19"
},
"resolutions": {
"msgpackr": "^1.10.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"package:preview": "yarn clean:dist && yarn rebuild && electron-builder --dir"
},
"engines": {
"yarn": "1.0.x || >=1.2.1",
"node": ">=12.14.1 <17"
"yarn": ">=1.7.0 <2",
"node": ">=16 <19"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 39dadea

Please sign in to comment.