Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build components with Node 16 or greater. #430

Merged
merged 1 commit into from
Aug 31, 2022
Merged

Build components with Node 16 or greater. #430

merged 1 commit into from
Aug 31, 2022

Conversation

kaladay
Copy link
Contributor

@kaladay kaladay commented Aug 30, 2022

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 #429

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
```
@kaladay kaladay changed the base branch from master to staging August 30, 2022 19:28
@kaladay
Copy link
Contributor Author

kaladay commented Sep 1, 2022

This happened to solve this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build components with Node 16 or greater Update deprecated karma coverage package
2 participants