hapipal / boilerplate

A friendly, proven starting place for your next hapi plugin or deployment
https://hapipal.com
183 stars 27 forks source link

First npm i with deprecated warnings #97

Closed diegofhe closed 3 years ago

diegofhe commented 3 years ago

System: node version: v14.12.0

After runing npx hpal new [projectName]

cd into the project and run npm i

npm WARN deprecated @hapi/hoek@6.2.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/joi@15.1.1: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411) npm WARN deprecated @hapi/bounce@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/somever@2.1.1: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/wreck@15.1.0: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/boom@7.4.11: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/joi@16.1.8: joi is leaving the @hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411) npm WARN deprecated @hapi/formula@2.0.0: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/address@2.1.4: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/formula@1.2.0: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/pinpoint@1.0.2: This version has been deprecated and is no longer supported or maintained

devinivy commented 3 years ago

Can you share the contents of your package.json, and when you ran npx hpal new my-project? When I run this today I get this output, which is much less scary:

❯ npm install
npm WARN deprecated @hapi/hoek@6.2.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ttproj@1.0.0 No description
npm WARN ttproj@1.0.0 No repository field.

added 286 packages from 191 contributors and audited 290 packages in 7.772s

12 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
diegofhe commented 3 years ago

Yes

Here is my package.json

{
  "name": "stickynotes",
  "version": "1.0.0",
  "description": "",
  "author": "",
  "license": "ISC",
  "main": "lib/index.js",
  "directories": {
    "lib": "lib",
    "test": "test"
  },
  "scripts": {
    "start": "node server",
    "test": "lab -a @hapi/code -L",
    "lint": "eslint ."
  },
  "dependencies": {
    "@hapi/boom": "9.x.x",
    "haute-couture": "3.x.x",
    "joi": "17.x.x"
  },
  "devDependencies": {
    "@hapi/code": "8.x.x",
    "@hapi/eslint-config-hapi": "13.x.x",
    "@hapi/eslint-plugin-hapi": "4.x.x",
    "@hapi/glue": "8.x.x",
    "@hapi/hapi": "20.x.x",
    "@hapi/lab": "23.x.x",
    "babel-eslint": "10.x.x",
    "confidence": "4.x.x",
    "dotenv": "8.x.x",
    "eslint": "7.x.x",
    "hpal": "2.x.x",
    "hpal-debug": "1.x.x",
    "toys": "2.x.x"
  }
}

and a small video of the issue

https://www.loom.com/share/985f433c02c646049cefa1cf3101abbb

devinivy commented 3 years ago

Thanks for all the info and the video, it made it much simpler to debug. I do see that I have also installed most of the deprecated packages that npm listed to you. However, I don't get those installation warnings. My guess is that we are running different versions of npm or have different npm settings. Perhaps the difference in behavior has something to do with the deprecated versions being either a. transitive dependencies or b. transitive dev dependencies.

In any case, it appears that your installation is probably fine, or at least similar to my fresh installation. The deprecated versions are mostly used by modules trying to support a wide range of nodejs versions. You will notice there are some breaking changes coming soon across the hapi pal ecosystem which will drop support for old versions of node, allowing us to upgrade lots of dependencies which we currently use only in order to support down to node v8 and v10. The good news is that these modules are very stable and are unlikely to cause issues. I am a maintainer of hapi, so if there is a significant issue with any of those modules I will become aware of it 👍

devinivy commented 3 years ago

Update! I was able to reproduce using npm install --no-cache. These versions must have relatively new deprecation notices. This will be resolved once the pal ecosystem is updated to no longer support old versions of node (as mentioned above), which is in progress. I don't think there's a lot we can do in the interim. The noise on initial install is a bit annoying, but in practice these modules are still in good shape 👍

Thanks for bringing this up, though: it's good to know that this is the current installation experience.