TAMULib / weaver-components

Custom Web Components for the Weaver UI
MIT License
0 stars 1 forks source link

Build components with Node 16 or greater. #488

Closed kaladay closed 2 years ago

kaladay commented 2 years ago

Add minimum requirement of Node 16 and npm 8.

Upgrade dependencies, where possible. Some packages are not upgrade due to problems or potential problems.

Switch from rxjs to rxjs-compat, which is the new location for the old rxjs that we are using. This allows for using the ^ character to get the latest bugfix version for the 6.x releases.

Replace tslint with eslint using tslint-to-eslint-config like this:

npx tslint-to-eslint-config --prettier --comments

This requires removing angular-tslint-rules.

Fix bug in scripts/build-version.js that prevents building. The directory path ./dist/bundle may not exist and needs to be created if it does not exist.

Running this on Node 18 is not easily supported. An extra step of adding an environment variable might be needed, such as:

export NODE_OPTIONS=--openssl-legacy-provider

Switching to the new Angular (13+, 14+, etc..) would avoid this but this introduces more problems.

The package.json utilizes overrides for eslint due to webpack bringing in a version that causes problems:

Error: node_modules/@types/eslint/index.d.ts:451:42 - error TS2724: '"/home/runner/work/weaver-components/weaver-components/node_modules/@types/estree/index"' has no exported member named 'ChainExpression'. Did you mean 'ThisExpression'?

451         ChainExpression?: ((node: ESTree.ChainExpression & NodeParentExtension) => void) | undefined;
                                             ~~~~~~~~~~~~~~~
Error: node_modules/@types/eslint/index.d.ts:474:43 - error TS2694: Namespace '"/home/runner/work/weaver-components/weaver-components/node_modules/@types/estree/index"' has no exported member 'ImportExpression'.

474         ImportExpression?: ((node: ESTree.ImportExpression & NodeParentExtension) => void) | undefined;
                                              ~~~~~~~~~~~~~~~~

Error: Process completed with exit code 1.

Updated dependencies based on the results of:

npx npm-check-updates

resolves TAMULib/tamu-library-components#429