Skip to content

Commit

Permalink
Merge pull request #2449 from kuzzleio/node-18-support
Browse files Browse the repository at this point in the history
Node 18 support
  • Loading branch information
Shiranuit committed Apr 24, 2023
2 parents 4e8fed3 + 99a4062 commit 7a15b9a
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
NODE_LTS_MAINTENANCE_VERSION: "14"
NODE_LTS_ACTIVE_VERSION: "16"
# NODE_LTS_CURRENT_VERSION: "18" # Stand for the latest LTS version
NODE_LTS_CURRENT_VERSION: "18" # Stand for the latest LTS version
DOCKER_PLATFORMS: "linux/amd64,linux/arm64"

jobs:
Expand All @@ -20,7 +20,7 @@ jobs:
steps:
- id: set-matrix
run: |
echo "::set-output name=matrix::{\"node-version\": [\"$NODE_LTS_MAINTENANCE_VERSION\", \"$NODE_LTS_ACTIVE_VERSION\"]}"
echo "::set-output name=matrix::{\"node-version\": [\"$NODE_LTS_MAINTENANCE_VERSION\", \"$NODE_LTS_ACTIVE_VERSION\", \"$NODE_LTS_CURRENT_VERSION\"]}"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
node_lts_active_version: ${{ env.NODE_LTS_ACTIVE_VERSION }}
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,14 @@ npx kourou app:scaffold playground

🚀 Kourou - Scaffolds a new Kuzzle application

✔ Creating playground/ directory
✔ Creating and rendering application files
✔ Installing latest Kuzzle version via NPM and Docker (this can take some time)
[✔] Scaffolding complete! Use "npm run dev:docker" to run your application

[✔] Scaffolding complete! Use cd playground && npm run docker npm install install dependencies and then npm run docker:dev to run your application!
```

Then you need to run Kuzzle services, Elasticsearch and Redis: `kourou app:start-services`

Finally you can run your application inside Docker with `npm run dev:docker`
Finally you can run your application inside Docker with `npm run docker:dev`

Kuzzle is now listening for requests on the port `7512`!

Expand Down
4 changes: 2 additions & 2 deletions doc/2/api/koncorde-filters-syntax/clauses/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ And this filter validates the second document:

## `select`

<SinceBadge version="auto-version"/>
<SinceBadge version="2.23.0"/>

Executes a Koncorde query on a particular index of an array

Expand Down Expand Up @@ -251,7 +251,7 @@ And this filter validates the second document:

## `match`

<SinceBadge version="auto-version"/>
<SinceBadge version="2.23.0"/>

Test if properties of the filter is matching with the properties of the document.

Expand Down
2 changes: 1 addition & 1 deletion doc/2/framework/classes/backend-subscription/add/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: BackendSubscription.add method

# `add()`

<SinceBadge version="auto-version" />
<SinceBadge version="2.22.0" />

Registers a new realtime subscription on the specified connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: BackendSubscription class properties

# BackendSubscription

<SinceBadge version="auto-version" />
<SinceBadge version="2.22.0" />

The `BackendSubscription` class handles subscriptions to the realtime engine for a specific connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: BackendSubscription.remove method

# `remove()`

<SinceBadge version="auto-version" />
<SinceBadge version="2.22.0" />

Removes a realtime subscription on the specified connection.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The format of those events is the following:
- `<controller>:before<Action>`: emitted before processing
- `<controller>:after<Action>`: emitted after processing, before sending back the response

Restarts your application with the following command to display events: `DEBUG=kuzzle:events npm run dev:docker`
Restarts your application with the following command to display events: `DEBUG=kuzzle:events npm run docker:dev`

::: info
Kuzzle uses the [debug](https://www.npmjs.com/package/debug) package to display messages.
Expand Down
6 changes: 3 additions & 3 deletions doc/2/guides/getting-started/run-kuzzle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In this guide we will use Docker and Docker Compose to run those services.

### Prerequisites

- [Node.js >= 12](https://nodejs.org/en/download/)
- [Node.js <= 16](https://nodejs.org/en/download/)
- [Docker](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Kourou](https://github.com/kuzzleio/kourou)
Expand Down Expand Up @@ -91,10 +91,10 @@ app
.catch(console.error);
```

We can now run our first application with `npm run dev:docker`
We can now run our first application with `npm run docker:dev`

::: info
Under the hood, the command `npm run dev:docker` uses [nodemon](https://nodemon.io/) and [ts-node](https://www.npmjs.com/package/ts-node) inside the Docker container to run the application.
Under the hood, the command `npm run docker:dev` uses [nodemon](https://nodemon.io/) and [ts-node](https://www.npmjs.com/package/ts-node) inside the Docker container to run the application.
:::

Now visit [http://localhost:7512](http://localhost:7512) with your browser. You should see the result of the [server:info](/core/2/api/controllers/server/info) action.
Expand Down
4 changes: 2 additions & 2 deletions docker/images/kuzzle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Production build image
################################################################################
FROM node:12-bullseye-slim as builder
FROM node:14-bullseye-slim as builder

RUN set -x \
&& apt-get update \
Expand Down Expand Up @@ -45,7 +45,7 @@ RUN set -x \
################################################################################
# Production build 2 image
################################################################################
FROM node:12-bullseye-slim as minifier
FROM node:14-bullseye-slim as minifier

ENV NODE_ENV=production

Expand Down
2 changes: 1 addition & 1 deletion docker/images/plugin-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################################################################
# Plugin development build image
################################################################################
FROM node:12-bullseye-slim as builder
FROM node:14-bullseye-slim as builder

RUN set -x \
&& apt-get update && apt-get install -y \
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kuzzle",
"author": "The Kuzzle Team <support@kuzzle.io>",
"version": "2.21.1",
"version": "2.23.0",
"description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
"bin": "bin/start-kuzzle-server",
"scripts": {
Expand Down Expand Up @@ -79,7 +79,7 @@
"semver": "^7.3.8",
"sorted-array": "^2.0.4",
"uuid": "^9.0.0",
"uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.0.0.tar.gz",
"uWebSockets.js": "https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.7.0.tar.gz",
"validator": "^13.9.0",
"winston": "^3.8.2",
"winston-elasticsearch": "0.17.1",
Expand Down

0 comments on commit 7a15b9a

Please sign in to comment.