Skip to content

Drop node v12 support #4279

@kanongil

Description

@kanongil

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: n/a
  • module version: v20.x
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): standalone
  • any other relevant information:

What problem are you trying to solve?

Allow to develop hapi and modules using more current node.js and javascript APIs and features. v12 is in maintenance mode and support ends 2022-04-30.

New JS features we can use:

  1. Optional chaining syntax (?.).
  2. Nullish coalescing operator (a ?? b).
  3. Private class methods (this.#privateMethod()).
  4. WeakRef support.

From node 14 (LTS with v14.15.0) we get:

  1. ESM modules (stable from v14.17.0, but also in v12.22.0).
  2. Top-Level await support.
  3. A more stable stream.pipeline().
  4. Fs.rm() method.

If we require v14.17+, we could also sneak in:

  1. AbortSignal support in node APIs.

Do you have a new or modified API suggestion to solve the problem?

N/A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changesChange that can breaking existing codefeatureNew functionality or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions