Haxe version is always 3.4.7 when installing from NPM

I’m trying to setup an OpenFL NPM project for the first time but I don’t understand how I can controll the haxe/haxelib version in my installation.

yo openfl generates packages.json file with the following (choosing Haxe as a programming language):

  "config": {
    "haxe": "3.4.4"
  },
  "devDependencies": {
    "haxe": "^4.1.0",
    "haxe-loader": "^0.5.0",
    "openfl": "^7.0.0",
    "uglifyjs-webpack-plugin": "^1.1.4",
    "webpack": "^3.10.0",
    "webpack-dev-server": "^2.9.7",
    "webpack-merge": "^4.1.1"
  }

I change

  "config": {
    "haxe": "3.4.4"
  }

to

  "config": {
    "haxe": "4.1.0"
  }

remove node_modules and package-lock.json and do npm install and the output is:

> [email protected] install /path/to/project/node_modules/haxe
> node install.js

using default haxe version
using default haxelib version
using default neko version
clean folder
Getting Haxe 3.4.7 for linux
http://haxe.org/website-content/downloads/3.4.7/downloads/haxe-3.4.7-linux64.tar.gz
using cached version
Getting Haxelib 3.3.0
https://github.com/HaxeFoundation/haxelib/archive/3.3.0.tar.gz
using cached version
Getting NekoVM 2.2.0
https://github.com/HaxeFoundation/neko/releases/download/v2-2-0/neko-2.2.0-linux64.tar.gz
using cached version
Installing Haxelib Dependencies to /path/to/project/

Why it’s using version 3.4.7 instead of 4.1.0? How can I control Haxe and Haxelib version?

Ok, I figured out that haxe npm dependency version has nothing to do with actual version of Haxe compiler and also the way versions are configured in the latest (5.2.1) version is different from what’s yo generator is creating. Looks like the generator is outdated? Or there’s a way to update it on my side?