less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
17k stars 3.41k forks source link

chore: upgrade typescript/eslint related dependencies, drop node8 and add node16 CI support #3628

Closed iChenLei closed 3 years ago

iChenLei commented 3 years ago

Fix the CI test terminal warning

============= WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree. You may find that it works just fine, or you may not. SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <3.10.0 YOUR TYPESCRIPT VERSION: 4.1.3 Please only submit bug reports when using the officially supported version.

Upgrade list:

  1. @typescript-eslint/eslint-plugin ^3.3.0 -> ^4.28.0
  2. @typescript-eslint/parser ^3.3.0 -> ^4.28.0
  3. rollup ^2.34.1 -> ^2.52.2
  4. ts-node ^8.4.1 -> ^9.1.1

    Why not upgrade to ^10.0.0, look this thread -> https://github.com/TypeStrong/ts-node/issues/693 , so we need waiting new verison release to fix throw new TypeError(${relative(cwd, fileName)}: Emit skipped)

  5. typescript ^4.1.3 -> ^4.3.4
  6. tslib ^1.10.0 -> ^2.3.0

    Why upgrade v2 ? To support latest typescript version, for example https://github.com/microsoft/tslib/pull/133 https://github.com/microsoft/tslib/pull/146 https://github.com/microsoft/tslib/pull/151

  7. eslint ^6.8.0 -> ^7.29.0

    Why drop node8 CI ? https://eslint.org/docs/user-guide/migrating-to-7.0.0#nodejs-8-is-no-longer-supported for more details, and Node.js 8 reached EOL in December 2019

Attention !

Don't upgrade rollup-plugin-typescript2 from 0.29.0 to 0.30.0, becaus it throw a compile error when encount npm package node_modules/parse-node-version. (need to investigation and report bug to https://github.com/ezolenko/rollup-plugin-typescript2

matthew-dean commented 3 years ago

Looks like tests are failing?

iChenLei commented 3 years ago

Yes,it's werid. All test passed in my local machine. Try to investigate it.

iChenLei commented 3 years ago

https://eslint.org/docs/user-guide/migrating-to-7.0.0#nodejs-8-is-no-longer-supported

So hold on this PR, I will create a new PR to drop node8 support / add node 16 support and migrate travis-ci.org to Github Actions.

I am confused aboute appveyor's node version ! @matthew-dean Whatever you set Environment: nodejs_version=xx, our node --version && npm --version still output

node --version && npm --version
v8.17.0
6.13.4
cd packages/less && npm test

example link: https://ci.appveyor.com/project/lukeapage/less-js/builds/39727397/job/7xcn72bns87m7iw8#L28 It's a - nodejs_version: "14" test!


There is a long-term bug in our appveyor CI ! Matrix nodejs_version not work actually. You must add install script like follow

- ps: Install-Product node $env:nodejs_version

otherwise your nodejs_version always be default appveyor nodjs_version (current is node8). If you add install script you will get correct matrix test.

Running Install scripts
Install-Product node $env:nodejs_version
Uninstalling node 8.17.0 (x86)...
Installing node 10.24.1 (x86)...

https://help.appveyor.com/discussions/questions/11941-node-version-not-available-after-specifying-nodejs_version for more details.